diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/telegram-host-notification.sh | 9 | ||||
| -rwxr-xr-x | scripts/telegram-service-notification.sh | 23 |
2 files changed, 4 insertions, 28 deletions
diff --git a/scripts/telegram-host-notification.sh b/scripts/telegram-host-notification.sh index 5d42709..c550f5d 100755 --- a/scripts/telegram-host-notification.sh +++ b/scripts/telegram-host-notification.sh @@ -39,14 +39,9 @@ done ## Build the notification message NOTIFICATION_MESSAGE=`cat << EOF -***** Host Monitoring on $ICINGA2HOST ***** +[$HOSTSTATE] $HOSTDISPLAYNAME -$HOSTDISPLAYNAME is $HOSTSTATE! - -Info: $HOSTOUTPUT - -When: $DATE -Host: $HOSTNAME +$HOSTOUTPUT EOF ` 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 |
