In Nagios you can enter the host Alias information such as for example:
host_name wsus01
alias Microsoft Wsus Update server
address wsus.domain.local
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:
Code: Select all
/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 ?