diff options
Diffstat (limited to 'scripts/telegram-service-notification.sh')
| -rwxr-xr-x | scripts/telegram-service-notification.sh | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/scripts/telegram-service-notification.sh b/scripts/telegram-service-notification.sh index c5815ec..b0a6d61 100755 --- a/scripts/telegram-service-notification.sh +++ b/scripts/telegram-service-notification.sh @@ -1,5 +1,4 @@ #!/bin/sh -#!/bin/sh # (C) Tobias Wiese | GPLv2+ # This file is based on mail-service-notification.sh from Icinga used under GPLv2+ license # Except of function urlencode which is Copyright (C) by Brian White (brian@aljex.com) used under MIT license @@ -41,30 +40,12 @@ done ## Build the notification message NOTIFICATION_MESSAGE=`cat << EOF -***** Service Monitoring on $ICINGA2HOST ***** - -$SERVICEDISPLAYNAME on $HOSTDISPLAYNAME is $SERVICESTATE! - -Info: $SERVICEOUTPUT +[$SERVICESTATE] $SERVICEDISPLAYNAME on $HOSTDISPLAYNAME -When: $DATE -Service: $SERVICENAME -Host: $HOSTNAME +$SERVICEOUTPUT EOF ` -## Check whether IPv4 was specified. -if [ -n "$ADDRESS" ] ; then - NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE -IPv4: $ADDRESS" -fi - -## Check whether IPv6 was specified. -if [ -n "$ADDRESS6" ] ; then - NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE -IPv6: $ADDRESS6" -fi - ## Check whether author and comment was specified. if [ -n "$COMMENT" ] ; then NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE |
