Email Notifications Not Arriving After Upgrade

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
JNelson
Posts: 11
Joined: Fri Oct 02, 2015 10:04 am
Location: Melville, NY

Email Notifications Not Arriving After Upgrade

Post by JNelson »

(Moved from the General Support forum)

Hi,

I upgraded our Nagios XI 2014R2 to 5.4.7 last night, and now email notifications aren't arriving correctly. This was working properly before the upgrade. The logs show that emails are being sent.
[1501071308] SERVICE NOTIFICATION: USERNAME;IT06010;Port Usage Errors Discards;OK;xi_service_notification_handler;SERVICE:UP (0.4%/0.0%/0.0/0.0/0.0/0.0), SERVICE:UP (2.8%/39.7%/0.0/0.0/0.0/2.9), SERVICE:UP (0.0%/0.0%/0.0/0.0/0.0/0.0):3 UP: OK
However, the /var/log/maillog shows no attempt to send email. Logging in as the "nagios" user and sending the following command works correctly.

Code: Select all

/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\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$ **" [email protected]
Within the Web GUI, if I "Send Test Notification" to myself, it advances to a blank page, and again, nothing in maillog and no email arrives.

Running RHEL updates did appear to reset the postfix configuration to default. However, I changed the relay host, and it works from the command line again. Since it's not even hitting the logs, I think it may be a separate issue, possibly on the Nagios side.

Could someone please assist me in troubleshooting this issue?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Email Notifications Not Arriving After Upgrade

Post by lmiltchev »

How many of the monitoring contacts are having issues with notifications - one, some, all? Are they "contacts only" or "xi users"? They are not the same. For more information on the topic, review the document below:
https://assets.nagios.com/downloads/nag ... ntacts.pdf

Did you use custom (modified) notification handlers prior to the upgrade?

The command that you tested (that worked) is the "notify-host-by-email" command, which is typically used by "contacts only". The notification from the log shows "xi_service_notification_handler", which is normally used by "xi users". It's possible that for some reason notifications stopped working for users. In order to start troubleshooting, please follow all of the steps, outlined in our "Nagios XI - Notification Problems" document here:
https://support.nagios.com/kb/article/n ... blems.html

Does the "/usr/local/nagiosxi/tmp/phpmailer.log" exist on your system? If it does, can you post it?
Be sure to check out our Knowledgebase for helpful articles and solutions!
JNelson
Posts: 11
Joined: Fri Oct 02, 2015 10:04 am
Location: Melville, NY

Re: Email Notifications Not Arriving After Upgrade

Post by JNelson »

The following error was in the log file "/usr/local/nagiosxi/tmp/phpmailer.log".
PHP Fatal error: Call to undefined function mb_convert_encoding() in /usr/local/nagiosxi/html/includes/utils-email.inc.php on line 81
This lead me to realize that the package "php-mbstring" had been uninstalled as part of a large yum update I did before the migration. Once I installed the package, a flood of backlogged emails started flowing. The issue is now resolved. Thanks for your help.
bolson

Re: Email Notifications Not Arriving After Upgrade

Post by bolson »

Is it ok if we close this topic?
JNelson
Posts: 11
Joined: Fri Oct 02, 2015 10:04 am
Location: Melville, NY

Re: Email Notifications Not Arriving After Upgrade

Post by JNelson »

Yes, go ahead. Thanks again.
bolson

Re: Email Notifications Not Arriving After Upgrade

Post by bolson »

Closing topic as resolved.

Thank you for using the Nagios Support Forum.
Locked