Issue with email Notifications to users

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
op-team
Posts: 50
Joined: Fri Jun 02, 2017 6:19 am

Issue with email Notifications to users

Post by op-team »

Hi Guys,
We are running Nagios 5.6.14 on a centos6.10

Users are not receiving alerts notifications.
It works when we test from Manage Email Settings > Send a Test Email

We can see from nagios.log, notifications event but no mail in our mailbox:

[root@nagios-01: ~]# grep -i notification /usr/local/nagios/var/nagios.log
...
[1601641663] SERVICE NOTIFICATION: cld-gvoillaume;nagios-01;License Check;WARNING;xi_service_notification_handler;TEST NOTIFICATIONS
[1601641663] SERVICE NOTIFICATION: cld-hdjouaka;nagios-01;License Check;WARNING;xi_service_notification_handler;TEST NOTIFICATIONS
[1601641663] SERVICE ALERT: nagios-01;License Check;WARNING;HARD;1;TEST NOTIFICATIONS
...

no trace also in /var/log/maillog, /usr/local/nagiosxi/tmp/phpmailer.log or /usr/local/nagiosxi/var/eventman.log

Any help to look why the email alerts suddenly stopped getting sent?
Service, Host and Users notifications are enabled with the correct timeperiod.

Thanks in advcance for your quick answer
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Issue with email Notifications to users

Post by benjaminsmith »

Hi,

Make sure that you have phpmailer logging enabled if you'r using the SMTP option from the Admin > System Config > Email Settings page.
phpmailer-logging.png
Then navigate to Home.> Details >Host Status, clicked on a host, and select the Advanced Tab (+) and send a custom notification.

Then PM your system profile and I can review the logs for you.

Also, the following page has helpful tips for troubleshooting notification issues.

Nagios XI - Notification Problems

To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share in a private message or upload it to the post/ticket, and then reply to this post to bring it up in the queue.


Thanks,
Benjamin
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
op-team
Posts: 50
Joined: Fri Jun 02, 2017 6:19 am

Re: Issue with email Notifications to users

Post by op-team »

Hi,

Thanks for your quick reply.
Please have a look to my profile
[quote][/quote]

This is a major issue for us

Moderator's Note: The profile has been shared with the support team but has been removed from the public forum
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Issue with email Notifications to users

Post by benjaminsmith »

HI,

Did you recieve the custom notification you sent?

Code: Select all

[1601881631] HOST NOTIFICATION: alerts.nwuc;nagios-01;CUSTOM (UP);xi_host_notification_handler;OK - 172.16.213.20: rta 0.024ms, lost 0%;Habib Djouaka;test notification
The PHPmailer log is not showing any errors, so that is working.

Code: Select all

[10-02-2020 14:17:04] Message sent! (method=smtp;host=172.30.16.254;port=25;smtpauth=true;security=none), Referer: admin/testemail.php
[10-02-2020 14:59:50] Message sent! (method=smtp;host=172.30.16.254;port=25;smtpauth=true;security=none), Referer: account/testnotification.php > PHPmailer Test
Make sure the user notification preferences are set correctly and also check the spam filter on the user mailbox to make sure the notification is not getting filtered.
notification-preferences.png

Lastly, if this is major issue, it would be best to open a support ticket for faster resolution.
Benjamin
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
op-team
Posts: 50
Joined: Fri Jun 02, 2017 6:19 am

Re: Issue with email Notifications to users

Post by op-team »

Hi,

Did you receive the custom notification you sent? No, i didn't receive it
I can confirm that all user preferences are set correctly

For some user, i changed the command in the contact definition and the issue disappeared for those users.
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email

probably an issue with phpmailer?

B.Regards
Habib
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Issue with email Notifications to users

Post by benjaminsmith »

Hi Habib,

So those notification commands will use the default MTA on the Linux system, this is Sendmail for most systems and the other (XI) handlers will use phpmailer. I didn't see any errors in the phpmailer log, try running the following tail command and then send another custom notification and post the full output.

Code: Select all

tail -F /var/log/maillog /usr/local/nagiosxi/tmp/phpmailer.log /usr/local/nagiosxi/var/eventman.log /usr/local/nagios/var/nagios.log
If it's still not sending, then please follow the steps in the following KB article to turn on debugging for phpmailer. This will post any error messages into the UI.

PHPMailer - Troubleshooting Using Debug Logging

Lastly, can you attach or PM a screenshot of your Email Settings.

Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked