Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
frankhe
byfrankhe, April 24, 2012
But the installation note needs some modification, otherwise, the email subject/body will not be correct.
Modified version:
*)notify-host-by-email
command_line /usr/bin/python /usr/lib64/nagios/plugins/send_gmail.py -a $CONTACTEMAIL$ -b "***** Nagios *****\nnn\nnnNotification Type: $NOTIFICATIONTYPE$\nnnHost: $HOSTNAME$\nnnState: $HOSTSTATE$\nnnAddress: $HOSTADDRESS$\nnnInfo: $HOSTOUTPUT$\nnnDate/Time: $LONGDATETIME$" -s "** Nagios $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **"
*) notify-service-by-email
command_line /usr/bin/python /usr/lib64/nagios/plugins/send_gmail.py -a $CONTACTEMAIL$ -b "***** Nagios *****\nnn\nnnNotification Type: $NOTIFICATIONTYPE$\nnnService: $SERVICEDESC$\nnnHost: $HOSTALIAS$\nnnAddress: $HOSTADDRESS$\nnnState: $SERVICESTATE$\nnnDate/Time: $LONGDATETIME$\nnnAdditional Info: $SERVICEOUTPUT$" -s "** Nagios $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **"
Modified version:
*)notify-host-by-email
command_line /usr/bin/python /usr/lib64/nagios/plugins/send_gmail.py -a $CONTACTEMAIL$ -b "***** Nagios *****\nnn\nnnNotification Type: $NOTIFICATIONTYPE$\nnnHost: $HOSTNAME$\nnnState: $HOSTSTATE$\nnnAddress: $HOSTADDRESS$\nnnInfo: $HOSTOUTPUT$\nnnDate/Time: $LONGDATETIME$" -s "** Nagios $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **"
*) notify-service-by-email
command_line /usr/bin/python /usr/lib64/nagios/plugins/send_gmail.py -a $CONTACTEMAIL$ -b "***** Nagios *****\nnn\nnnNotification Type: $NOTIFICATIONTYPE$\nnnService: $SERVICEDESC$\nnnHost: $HOSTALIAS$\nnnAddress: $HOSTADDRESS$\nnnState: $SERVICESTATE$\nnnDate/Time: $LONGDATETIME$\nnnAdditional Info: $SERVICEOUTPUT$" -s "** Nagios $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **"