E-Mail notification not working
Posted: Fri Feb 12, 2016 7:16 am
Hi All
We are using the Nagio XI 5.2.3 CentOs appliance.
I have configured the Mail settings in Nagios XI and when I press "Send a Test Emai" it works.
But when I configure a service to send Emails using the command notify-service-by-email shown below, I does not work.
/usr/bin/printf "%b" "Info: $NOTIFICATIONTYPE$ $SERVICESTATE$ $SERVICEOUTPUT$\nDate/Time: $DATE$ $TIME$\n(Timestamp when the Alarm has left the Nagios system!)\nHost: $HOSTNAME$/$HOSTALIAS$\nService: $SERVICEDESC$\nWiki: $SERVICENOTESURL$\nAlarm sent by NagiosXI" | /bin/mail -r [email protected] -s "$HOSTNAME$: $SERVICESTATE$ $SERVICEDESC$" $CONTACTEMAIL$
Also trying to send Emails using the cmd with the command: "echo 'test1' | mail -r [email protected] -s "TEST1" [email protected]" is not working.
Thank you for your quick help.
Cheers,
We are using the Nagio XI 5.2.3 CentOs appliance.
I have configured the Mail settings in Nagios XI and when I press "Send a Test Emai" it works.
But when I configure a service to send Emails using the command notify-service-by-email shown below, I does not work.
/usr/bin/printf "%b" "Info: $NOTIFICATIONTYPE$ $SERVICESTATE$ $SERVICEOUTPUT$\nDate/Time: $DATE$ $TIME$\n(Timestamp when the Alarm has left the Nagios system!)\nHost: $HOSTNAME$/$HOSTALIAS$\nService: $SERVICEDESC$\nWiki: $SERVICENOTESURL$\nAlarm sent by NagiosXI" | /bin/mail -r [email protected] -s "$HOSTNAME$: $SERVICESTATE$ $SERVICEDESC$" $CONTACTEMAIL$
Also trying to send Emails using the cmd with the command: "echo 'test1' | mail -r [email protected] -s "TEST1" [email protected]" is not working.
Thank you for your quick help.
Cheers,