Page 1 of 1
Email notification problem
Posted: Sat Sep 07, 2019 1:07 pm
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?
Re: Email notification problem
Posted: Mon Sep 09, 2019 11:06 am
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.
Re: Email notification problem
Posted: Mon Sep 09, 2019 11:56 am
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?
Re: Email notification problem
Posted: Mon Sep 09, 2019 2:26 pm
by orani
Solved after rebooting the server. After reboot i received all mails (new and stacked)
Re: Email notification problem
Posted: Mon Sep 09, 2019 4:05 pm
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.