Page 1 of 3

XI cannot send a notification email when service critical.

Posted: Thu Apr 25, 2019 11:57 pm
by dimsum
Hi,

My XI worked after last week XI cannot send an email when host or service critical. Test send email is working. I have upgraded from 5.5 to 5.6 already but not help.

Any idea please advise.

Thanks.

Re: XI cannot send a notification email when service critica

Posted: Fri Apr 26, 2019 6:42 am
by jacek
Have exactly the same issue (but I was already on 5.6.0 when things stopped).
Stopped working for me somewhere between 24 and 25th.
We are using SMTP for sending mails and test mails are working without issues.
the eventman.log is completely empty.

I have an ongoing ticket about an other issue and I mailed in that ticket about this issue as well (#475721).

Re: XI cannot send a notification email when service critica

Posted: Fri Apr 26, 2019 8:14 am
by tbs-infrastructure
I am also facing the same issue. Despite NagiosXI showing that it has sent a notification, I got no emails, however, when testing the emails settings, I get the test email, so those settings are good. I am also on 5.6 and it was working fine until yesterday I had to restart the VM.

Re: XI cannot send a notification email when service critica

Posted: Fri Apr 26, 2019 8:28 am
by jacek
Looks like something might be outdated (like a certificate or so)?
I also rebooted the nagios server a few times, I expanded RAM and disk space.
One additional thing I noted was that the Performance grapher doesn't start after a reboot, need to do the start action - don't think it's related.

What do you see when you run this command and then force some immediate checks and custom notifications?
Nothing happens on my site (PROCESSED 0 EVENTS all the time)

Code: Select all

tail -f /usr/local/nagiosxi/var/eventman.log

Re: XI cannot send a notification email when service critica

Posted: Fri Apr 26, 2019 8:45 am
by tbs-infrastructure
jacek wrote:Looks like something might be outdated (like a certificate or so)?
I also rebooted the nagios server a few times, I expanded RAM and disk space.
One additional thing I noted was that the Performance grapher doesn't start after a reboot, need to do the start action - don't think it's related.

What do you see when you run this command and then force some immediate checks and custom notifications?
Nothing happens on my site (PROCESSED 0 EVENTS all the time)

Code: Select all

tail -f /usr/local/nagiosxi/var/eventman.log
Same for me.

Re: XI cannot send a notification email when service critica

Posted: Fri Apr 26, 2019 10:23 am
by lmiltchev
Start a running tail on the event_handler.log:

Code: Select all

tail -f /usr/local/nagiosxi/var/event_handler.log
and watch the output for a while for errors. This may help identify the issue.

Re: XI cannot send a notification email when service critica

Posted: Fri Apr 26, 2019 10:53 am
by tbs-infrastructure
Here what I got:

tail -f /usr/local/nagiosxi/var/event_handler.log
(
[eventqueue_id] => 81
[event_time] => 2019-04-26 11:48:02
[event_source] => 2
[event_type] => 1
[event_meta] => YToyMDp7czoxMjoiaGFuZGxlci10eXBlIjtzOjc6InNlcnZpY2UiO3M6NDoiaG9zdCI7czoxNToiRlcgLSBocWZpcmV3YWxsIjtzOjc6InNlcnZpY2UiO3M6MTc6ImFlMS4xMTAgQmFuZHdpZHRoIjtzOjExOiJob3N0YWRkcmVzcyI7czoxMDoiaHFmaXJld2FsbCI7czo5OiJob3N0c3RhdGUiO3M6MjoiVVAiO3M6MTE6Imhvc3RzdGF0ZWlkIjtzOjE6IjAiO3M6MTE6Imhvc3RldmVudGlkIjtzOjE6IjAiO3M6MTM6Imhvc3Rwcm9ibGVtaWQiO3M6MToiMCI7czoxMjoic2VydmljZXN0YXRlIjtzOjg6IkNSSVRJQ0FMIjtzOjE0OiJzZXJ2aWNlc3RhdGVpZCI7czoxOiIyIjtzOjE2OiJsYXN0c2VydmljZXN0YXRlIjtzOjg6IkNSSVRJQ0FMIjtzOjE4OiJsYXN0c2VydmljZXN0YXRlaWQiO3M6MToiMiI7czoxNjoic2VydmljZXN0YXRldHlwZSI7czo0OiJTT0ZUIjtzOjE0OiJjdXJyZW50YXR0ZW1wdCI7czoxOiIzIjtzOjExOiJtYXhhdHRlbXB0cyI7czoxOiI1IjtzOjE0OiJzZXJ2aWNlZXZlbnRpZCI7czo0OiI2NTUxIjtzOjE2OiJzZXJ2aWNlcHJvYmxlbWlkIjtzOjQ6IjMyNTEiO3M6MTM6InNlcnZpY2VvdXRwdXQiO3M6NDk6IkNSSVRJQ0FMIC0gQ3VycmVudCBCVyBpbjogMy4zNU1icHMgT3V0OiA4Ny4xNU1icHMiO3M6MTc6ImxvbmdzZXJ2aWNlb3V0cHV0IjtiOjA7czoxNToic2VydmljZWRvd250aW1lIjtzOjE6IjAiO30=
)
LOCKFILE '/usr/local/nagiosxi/var/event_handler.lock' STILL EXISTS - EXITING!
LOCKFILE '/usr/local/nagiosxi/var/event_handler.lock' STILL EXISTS - EXITING!
LOCKFILE '/usr/local/nagiosxi/var/event_handler.lock' STILL EXISTS - EXITING!
LOCKFILE '/usr/local/nagiosxi/var/event_handler.lock' STILL EXISTS - EXITING!

Re: XI cannot send a notification email when service critica

Posted: Fri Apr 26, 2019 10:58 am
by tbs-infrastructure
One more thing, this was caused by the update to 5.6, I created a snapshot of the VM before the update and reverting to the previous version everything starts working again.

Re: XI cannot send a notification email when service critica

Posted: Fri Apr 26, 2019 11:00 am
by jomann
Please delete the lock file:

Code: Select all

rm -f /usr/local/nagiosxi/var/event_handler.lock
This should fix the issue. The issue occurs when the event_handler cron does not properly stop. This could happen during restart. I've attached a new cron file that should fix the problem. It will also be fixed in XI 5.6.1.

To implement the fix, copy and overwrite the event_handler.php file in the /usr/local/nagiosxi/cron folder.

Re: XI cannot send a notification email when service critica

Posted: Fri Apr 26, 2019 11:06 am
by tbs-infrastructure
The issue seems to the tail -f /usr/local/nagiosxi/var/event_handler.lock file, by renaming that file the notifications started working again.