Email notification problem

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
orani
Posts: 169
Joined: Wed May 06, 2015 3:33 pm

Email notification problem

Post by orani »

I had my nagios server configured to send mail notifications but after updating to latest version 4.4.5 no notifications are sent to configured emails.

Any ideas?
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Email notification problem

Post by tgriep »

If you login to the GUI and so to the Reports > Notifications menu, do you see that there are Notifications being generated?

If not, go to the System > Process Info menu and check to see if Notifications are disabled.
Enable them if needed.


If you see that the system is generating Notifications, check the commands you are using to send the Notifications as well as checking the email log files.
Be sure to check out our Knowledgebase for helpful articles and solutions!
orani
Posts: 169
Joined: Wed May 06, 2015 3:33 pm

Re: Email notification problem

Post by orani »

I can see notifications being generated at the notifications tab. Also my notification commands seems to be ok.

Code: Select all

notify-host-by-email

/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$

notify-service-by-email

/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$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
What to look for at the mail log file?
Attachments
Screenshot_1.png
orani
Posts: 169
Joined: Wed May 06, 2015 3:33 pm

Re: Email notification problem

Post by orani »

Solved after rebooting the server. After reboot i received all mails (new and stacked)
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Email notification problem

Post by tgriep »

I would guess that what ever mailer daemon the server was running (Sendmail or Postfix) was hung and that was the issue in the first place.
Thanks for letting us know that the reboot fixed it and I will be locking the post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked