Page 1 of 2
Not able to receive alerts
Posted: Fri May 31, 2019 1:15 pm
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?
Re: Not able to receive alerts
Posted: Fri May 31, 2019 2:49 pm
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
Re: Not able to receive alerts
Posted: Fri May 31, 2019 3:21 pm
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
Re: Not able to receive alerts
Posted: Fri May 31, 2019 4:20 pm
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
Re: Not able to receive alerts
Posted: Fri May 31, 2019 4:28 pm
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
Re: Not able to receive alerts
Posted: Mon Jun 03, 2019 9:57 am
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.
Re: Not able to receive alerts
Posted: Mon Jun 03, 2019 10:32 am
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.
Re: Not able to receive alerts
Posted: Mon Jun 03, 2019 10:58 am
by scottwilkerson
Can you show the output of the following?
Code: Select all
tail -20 /usr/local/nagiosxi/tmp/phpmailer.log
Re: Not able to receive alerts
Posted: Mon Jun 03, 2019 12:19 pm
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
Re: Not able to receive alerts
Posted: Mon Jun 03, 2019 1:04 pm
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?