Not able to receive alerts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ITOMB_IMT
Posts: 181
Joined: Wed Oct 17, 2018 12:55 pm

Not able to receive alerts

Post by ITOMB_IMT »

HI,

currently am using Nagios xi 5.6.1, am not able to receive alerts(notifications) from nagios xi where as i can receive test emails,custom notifications from nagios xi.

contact has Notification commands as "xi_host_notification_handler and xi_service_notification_handler"

i checked /var/log/maillog i can see the alerts sent but they were delivered. am i missing something?

I added new monitoring on new servers, to check every 15 minutes i got alerted for the first time after that i didn't get any alerts from those Hosts/services. I checked the state History in Reports, even state also didn't change.

am i missing something?
ITOMB_IMT
Posts: 181
Joined: Wed Oct 17, 2018 12:55 pm

Re: Not able to receive alerts

Post by ITOMB_IMT »

when i run, tail -f /usr/local/nagiosxi/var/eventman.log
PHP Warning: file_put_contents(/usr/local/nagiosxi/tmp/phpmailer.log): failed to open stream: Permission denied in /usr/local/nagiosxi/html/includes/utils-email.inc.php on line 212
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Not able to receive alerts

Post by scottwilkerson »

ISSB_MAOST wrote:when i run, tail -f /usr/local/nagiosxi/var/eventman.log
PHP Warning: file_put_contents(/usr/local/nagiosxi/tmp/phpmailer.log): failed to open stream: Permission denied in /usr/local/nagiosxi/html/includes/utils-email.inc.php on line 212
Can you show the permissions of that file?

Code: Select all

ls -l /usr/local/nagiosxi/tmp/phpmailer.log
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
ITOMB_IMT
Posts: 181
Joined: Wed Oct 17, 2018 12:55 pm

Re: Not able to receive alerts

Post by ITOMB_IMT »

# ls -l /usr/local/nagiosxi/tmp/phpmailer.log
-rw-r--r-- 1 apache nagios 194 May 31 14:17 /usr/local/nagiosxi/tmp/phpmailer.log
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Not able to receive alerts

Post by scottwilkerson »

We need to allow the nagios user to write to this file, lets run the following

Code: Select all

chmod g+w /usr/local/nagiosxi/tmp/phpmailer.log
this should remove the error you are seeing, and allow you to see data in the logs
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
ITOMB_IMT
Posts: 181
Joined: Wed Oct 17, 2018 12:55 pm

Re: Not able to receive alerts

Post by ITOMB_IMT »

I made the changes you suggested but still i cant receive any alerts, and the alerts are not even logged in to event logs.
ITOMB_IMT
Posts: 181
Joined: Wed Oct 17, 2018 12:55 pm

Re: Not able to receive alerts

Post by ITOMB_IMT »

Also to add, some services are set to monitor for every 15 minutes and 0 notification interval and 0 first notification delay we are receiving alerts for every 1hr 15 mins.
Am i missing anything or something wrong in configuration.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Not able to receive alerts

Post by scottwilkerson »

Can you show the output of the following?

Code: Select all

tail -20 /usr/local/nagiosxi/tmp/phpmailer.log
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
ITOMB_IMT
Posts: 181
Joined: Wed Oct 17, 2018 12:55 pm

Re: Not able to receive alerts

Post by ITOMB_IMT »

# tail -20 /usr/local/nagiosxi/tmp/phpmailer.log
[06-03-2019 11:01:01] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 11:14:50] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 11:14:53] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 11:14:56] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 11:15:05] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 11:15:23] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 11:15:26] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 11:15:32] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 11:15:41] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 11:34:26] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 12:15:50] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 12:15:53] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 12:29:43] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 12:29:46] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 12:29:49] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 12:30:17] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 12:30:20] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 12:30:23] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 12:30:32] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[06-03-2019 12:49:16] Message sent! (method=sendmail), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Not able to receive alerts

Post by scottwilkerson »

So this is showing that the messages are being sent.

Could they be going to a spam filter or blocked based on the sender address?

Have you successfully sent a test message?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked