Change information / format of email notifications


I have noticed that on the email notifications of a service / host state it does not include the host name, only the alias, yet on the pager it includes the host.

Where can I edit the information contained within these incase I want to add other information.


On my server these are contained in /usr/local/nagios/etc/misccommands.cfg:

‘notify-by-email’ command definition


‘notify-by-pagerl’ command definition

These definitions are then used in the contacts.cfg file.

Not sure since I didn’t set it up but I suspect misscommands.cfg is the default location for these.


edit your misccommands.cfg for the command and make it show as you wish it to show.

‘notify-by-email’ command definition

define command{
command_name notify-by-email
command_line /usr/bin/printf “%b” “***** Nagios ***\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /bin/mail -s " $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **” $CONTACTEMAIL$