No alerts going out from Nagios

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
dfmco
Posts: 257
Joined: Wed Dec 04, 2013 11:05 am

No alerts going out from Nagios

Post by dfmco »

email test is successful but I am getting no email alerts when hosts or services fail.

Nagios 5.2.7 on CentOS 7 manual install.
Last edited by dfmco on Thu May 26, 2016 8:21 pm, edited 1 time in total.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: No alerts going out from Nagios

Post by Box293 »

Go to a service that is not working (Service Status Detail)
Click the Advanced tab
Click "Send custom notification"
Type a comment and click submit

Do all the contacts assigned to that service receive that notification?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dfmco
Posts: 257
Joined: Wed Dec 04, 2013 11:05 am

Re: No alerts going out from Nagios

Post by dfmco »

Sorry for the response delay. I am not getting notifications when I get a reply on topics anymore.

I ran the test and we received no notification at all. If I send a test notification from my user preferences page, that works. I see nothing in the mail log at all with the remote email addresses.
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: No alerts going out from Nagios

Post by bwallace »

1st thing to check straight-away: Login as the 'nagiosadmin' user and click the username in the top right. Then go to Notification Options > Notification Preferences - ensure that the 'Enable notifications' box is checked.

If that checks out then is your Nagios system configured to use sendmail or SMTP?
Admin > Manage Email Settings

If sendmail, you can check this log:
/var/log/maillog
tail -100 /var/log/maillog
--This file logs email sent through sendmail. Only applicable to core contact "notify-*-by-email" notification handlers and sendmail tests.

If you're using SMTP, check
/usr/local/nagiosxi/tmp/phpmailer.log
tail -100 /usr/local/nagiosxi/tmp/phpmailer.log

To further troubleshoot, run a notification report. In the UI go to Reports > Available Reports > Notifications (make sure the date range will contain alerts you were expecting to receive emails about). The output is actual notifications that XI sent out - you'll have to compare the time stamps seen here to what is logged on your mail Server (if any). If you seen zero notifications in the reports, then we'll have to check your configuration.

you can also refer to "nagios.log" - here you will see checks, notifications, external commands, and events:
/usr/local/nagios/var/nagios.log


If in any doubt, please post the logs here (scrub sensitive data first, though)
Be sure to check out the Knowledgebase for helpful articles and solutions!
dfmco
Posts: 257
Joined: Wed Dec 04, 2013 11:05 am

Re: No alerts going out from Nagios

Post by dfmco »

Enable notifications is checked.
We are using smtp
I can send a test mail with smtp
tail -100 /usr/local/nagiosxi/tmp/phpmailer.log give me an error. The only files in the tmp directory are mrtg files. I looked in var as well and did not see that file in there either.
tail: cannot open ‘/usr/local/nagiosxi/tmp/phpmailer.log’ for reading: No such file or directory
dfmco
Posts: 257
Joined: Wed Dec 04, 2013 11:05 am

Re: No alerts going out from Nagios

Post by dfmco »

How can I also stop the mail going to the local root account? The root email box is limited to 40Mb so it is constantly logging errors that it is full and I have no need for local email.
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: No alerts going out from Nagios

Post by bwallace »

On changing your current mail settings, refer to this doc, section "Mail Routing"
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

What is the result of running a notification report, as mentioned in my previous post?
Be sure to check out the Knowledgebase for helpful articles and solutions!
dfmco
Posts: 257
Joined: Wed Dec 04, 2013 11:05 am

Re: No alerts going out from Nagios

Post by dfmco »

Sorry I missed your previous post. Here is the notification report:
2016-05-24 15:49:44 Arlington Backup Serial0/0/0:0 Bandwidth No OK dflick Nagios XI OK - Current BW in: 0Mbps Out: 0Mbps
2016-05-24 15:49:44 Arlington Backup Serial0/0/0:0 Bandwidth No OK nagiosadmin Nagios XI OK - Current BW in: 0Mbps Out: 0Mbps
2016-05-24 15:49:27 Arlington Backup Serial0/0/0:0 Bandwidth No OK dflick Nagios XI OK - Current BW in: 0Mbps Out: 0Mbps
2016-05-24 15:49:27 Arlington Backup Serial0/0/0:0 Bandwidth No OK nagiosadmin Nagios XI OK - Current BW in: 0Mbps Out: 0Mbps
2016-05-24 15:32:33 DFW Airport BU Serial0/0/1:0 Status Service Problem No CRITICAL dflick Nagios XI CRITICAL - Interface Serial0/0/1:0 (index 9) is administratively down.
2016-05-24 15:32:33 DFW Airport BU Serial0/0/1:0 Status Service Problem No CRITICAL nagiosadmin Nagios XI CRITICAL - Interface Serial0/0/1:0 (index 9) is administratively down.
2016-05-24 15:15:45 Arlington Backup GigabitEthernet0/3 Bandwidth No OK dflick Nagios XI OK - Current BW in: 0Mbps Out: 0Mbps
2016-05-24 15:15:45 Arlington Backup GigabitEthernet0/3 Bandwidth No OK nagiosadmin Nagios XI OK - Current BW in: 0Mbps Out: 0Mbps
2016-05-24 15:10:11 Arlington Backup GigabitEthernet0/3 Bandwidth No OK dflick Nagios XI OK - Current BW in: 0Mbps Out: 0Mbps
2016-05-24 15:10:11 Arlington Backup GigabitEthernet0/3 Bandwidth No OK nagiosadmin Nagios XI OK - Current BW in: 0Mbps Out: 0Mbps
I checked junk mail and Spam filters and nothing is there. The test email makes it though.

Nagios logs see it:
[1464121966] Successfully launched command file worker with pid 25741
[1464122967] SERVICE NOTIFICATION: dflick;Arlington Backup;Serial0/0/0:0 Bandwidth;CUSTOM (OK);xi_service_notification_handler;OK - Current BW in: 0Mbps Out: 0Mbps;Daniel Flick;test
[1464122967] SERVICE NOTIFICATION: nagiosadmin;Arlington Backup;Serial0/0/0:0 Bandwidth;CUSTOM (OK);xi_service_notification_handler;OK - Current BW in: 0Mbps Out: 0Mbps;Daniel Flick;test
[1464122984] SERVICE NOTIFICATION: dflick;Arlington Backup;Serial0/0/0:0 Bandwidth;CUSTOM (OK);xi_service_notification_handler;OK - Current BW in: 0Mbps Out: 0Mbps;Daniel Flick;test2
[1464122984] SERVICE NOTIFICATION: nagiosadmin;Arlington Backup;Serial0/0/0:0 Bandwidth;CUSTOM (OK);xi_service_notification_handler;OK - Current BW in: 0Mbps Out: 0Mbps;Daniel Flick;test2
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: No alerts going out from Nagios

Post by rkennedy »

Can you post a screenshot of your Manage Email Settings page, and also PM over a profile for us to look at? (Admin -> System Profile -> Download Profile)

It looks like the notifications are firing, do you have the correct email address setup for nagiosadmin and dflick?

Sometimes notifications stop working because SQL crashes, try running /usr/local/nagiosxi/scripts/repair_databases.sh to see if that clears it up.
Former Nagios Employee
dfmco
Posts: 257
Joined: Wed Dec 04, 2013 11:05 am

Re: No alerts going out from Nagios

Post by dfmco »

email profile attached and profile sent via PM.
You do not have the required permissions to view the files attached to this post.
Locked