Page 1 of 2

Since 5.3.0 Global Event Handlers not working

Posted: Fri Oct 07, 2016 12:44 pm
by mcauble50
I have 2 Nagios XI servers using Global Event Handlers. Since upgrading to 5.3.0 the Global Event Handlers no longer work. I have uninstalled and reinstalled the Global Event Handler component. Any help would be appreciated.
Thanks

CentOS release 6.7 (Final)
64 bit
manual Install
SSL

Re: Since 5.3.0 Global Event Handlers not working

Posted: Fri Oct 07, 2016 1:01 pm
by lmiltchev
What is the version of the "Global Even Handlers" component that you see when you go to Admin->Manage Components? Have you enabled "state changes", "notifications" commands, or both? Can you show us a screenshot?
Can you also give us a specific example of the error that you are getting? Show us relevant configs/logs (hide sensitive info).

Re: Since 5.3.0 Global Event Handlers not working

Posted: Fri Oct 07, 2016 1:20 pm
by mcauble50
Global Event Handlers - 1.2.0
I'm not getting any errors. Events are not executing.
I have added a screenshot of my Global Event Handler screen.
What logs should I look at?

Thanks

Re: Since 5.3.0 Global Event Handlers not working

Posted: Fri Oct 07, 2016 1:38 pm
by dwhitfield
you can post /tmp/nagiosxi/upgrade.log here. Also, if you could PM me your profile that will help us. Admin -> System Profile (Under System Config) -> Download Profile.

Re: Since 5.3.0 Global Event Handlers not working

Posted: Fri Oct 07, 2016 1:49 pm
by lmiltchev
In addition to what dwhitfield said, start a running tail on the "event_handler.log":

Code: Select all

tail -f /usr/local/nagiosxi/var/event_handler.log
then go to Home->Host Detail, click on a host, go to "Advanced" tab, and submit a passive check result to change the current state of the host. Check the output of the tail command to see if anything shows up there.

You can do a very simple test by creating a bash script, i.e. "test.sh" as such:

Code: Select all

#!/bin/bash
DATE=$(date)
echo "The host has changed state at $DATE" >> /tmp/test.txt
Place it in /tmp, and made it executable:

Code: Select all

chmod +x /tmp/test.sh
Add it to your global event handler.
example01.PNG
and click on "Apply Settings". Create a host state change, and check to see of the "/tmp/test.txt" file was created.

Code: Select all

cat /tmp/test.txt

Re: Since 5.3.0 Global Event Handlers not working

Posted: Fri Oct 07, 2016 1:57 pm
by dwhitfield
Profile stored internally at T:\Forum Files\mcauble50

Re: Since 5.3.0 Global Event Handlers not working

Posted: Fri Oct 07, 2016 3:16 pm
by mcauble50
I did the tail on the event_handler.log
Created the bash script, made it executable.
Added it to the Global Event Handler
Created a state change. I see the event come up in the event_hander log. But, it never fires off the script.
Which is what I have been seeing on 2 different Nagios servers, since the upgrade.

Let me know if there is anything else you need.
Thanks

Re: Since 5.3.0 Global Event Handlers not working

Posted: Mon Oct 10, 2016 9:31 am
by rkennedy
It sounds like there may be a permission issue on the script you're executing at this point. What is the output of ls -la /path/to/your/script.sh?

Re: Since 5.3.0 Global Event Handlers not working

Posted: Mon Oct 10, 2016 9:38 am
by mcauble50
-rwxrwxr-x 1 apache nagios 6233 Oct 3 14:53 /usr/local/nagios/libexec/check_alert

This has been working for months. Quit working after latest upgrade.

Thanks

Re: Since 5.3.0 Global Event Handlers not working

Posted: Mon Oct 10, 2016 10:03 am
by mcauble50
Also as a test. I set the above script (check_alert) as a local event_handler on a host. Then submitted a passive check to create a state change. The script executed as expected.

Thanks