I’m trying to change some options in the alerts configuration.
In Nagios you can enter the host Alias information such as for example:
alias Microsoft Wsus Update server
Now i want in my host and service alert the Alias in the alert e-mail or sms.
I tried to following macro but that didn’t work: $HOSTALIAS$
My command to send the e-mail is like this:
/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
Instead of the $HOSTALIAS$ is just displays the hostname.
I’m running Nagios 3.2.3
Is it possible to display the alias in the notification ?