What can we build today?

Random notes of a Webdeveloper called Mario.

Recently we found out that the additional information was missing in mails sent from Icinga 1.6.x for any service notification. After fiddling around we compared our notification concifiguration against the "original" one and found out, that the "\n" after the $SERVICEOUTPUT$ macro was missing in the mail body.

Adding a newline ("\n") after the macro fixed the problem.

This is how our notification command looks like now:

# 'notify-service-by-email' command definition
define command{
    command_name    notify-service-by-email
    command_line    /usr/bin/printf "%b" "Notification Type: $NOTIFICATIONTYPE$\n\n \
                    Service: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\n \
                    State: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional \
                    Info:\n\n$SERVICEOUTPUT$\n" | /usr/bin/mail -s "$NOTIFICATIONTYPE$ \
                    Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$" \
                    $CONTACTEMAIL$
}