Merge pull request #5468 from cycloon/master

Make notification mails more readable. Remove redundancy and cruft.
This commit is contained in:
Michael Friedrich 2017-08-14 17:30:14 +02:00 committed by GitHub
commit c3ecc96820
2 changed files with 9 additions and 11 deletions

View File

@ -93,14 +93,14 @@ SUBJECT="[$NOTIFICATIONTYPE] Host $HOSTDISPLAYNAME is $HOSTSTATE!"
## Build the notification message ## Build the notification message
NOTIFICATION_MESSAGE=`cat << EOF NOTIFICATION_MESSAGE=`cat << EOF
***** Icinga 2 Host Monitoring on $HOSTNAME ***** ***** Host Monitoring on $HOSTNAME *****
==> $HOSTDISPLAYNAME ($HOSTNAME) is $HOSTSTATE! <== $HOSTDISPLAYNAME is $HOSTSTATE!
Info: $HOSTOUTPUT Info: $HOSTOUTPUT
When: $LONGDATETIME When: $LONGDATETIME
Host: $HOSTNAME (Display Name: "$HOSTDISPLAYNAME") Host: $HOSTNAME
EOF EOF
` `
@ -128,7 +128,6 @@ fi
if [ -n "$ICINGAWEB2URL" ] ; then if [ -n "$ICINGAWEB2URL" ] ; then
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
URL:
$ICINGAWEB2URL/monitoring/host/show?host=$HOSTNAME" $ICINGAWEB2URL/monitoring/host/show?host=$HOSTNAME"
fi fi

View File

@ -98,15 +98,15 @@ SUBJECT="[$NOTIFICATIONTYPE] $SERVICEDISPLAYNAME on $HOSTDISPLAYNAME is $SERVICE
## Build the notification message ## Build the notification message
NOTIFICATION_MESSAGE=`cat << EOF NOTIFICATION_MESSAGE=`cat << EOF
***** Icinga 2 Service Monitoring on $HOSTNAME ***** ***** Service Monitoring on $HOSTNAME *****
==> $SERVICEDISPLAYNAME on $HOSTDISPLAYNAME is $SERVICESTATE! <== $SERVICEDISPLAYNAME on $HOSTDISPLAYNAME is $SERVICESTATE!
Info: $SERVICEOUTPUT Info: $SERVICEOUTPUT
When: $LONGDATETIME When: $LONGDATETIME
Service: $SERVICENAME (Display Name: "$SERVICEDISPLAYNAME") Service: $SERVICENAME
Host: $HOSTNAME (Display Name: "$HOSTDISPLAYNAME") Host: $HOSTNAME
EOF EOF
` `
@ -134,7 +134,6 @@ fi
if [ -n "$ICINGAWEB2URL" ] ; then if [ -n "$ICINGAWEB2URL" ] ; then
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
URL:
$ICINGAWEB2URL/monitoring/service/show?host=$HOSTNAME&service=$SERVICENAME" $ICINGAWEB2URL/monitoring/service/show?host=$HOSTNAME&service=$SERVICENAME"
fi fi