Since 5.3.0 Global Event Handlers not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mcauble50
Posts: 9
Joined: Tue Nov 18, 2014 12:53 pm

Since 5.3.0 Global Event Handlers not working

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Since 5.3.0 Global Event Handlers not working

Post 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).
Be sure to check out our Knowledgebase for helpful articles and solutions!
mcauble50
Posts: 9
Joined: Tue Nov 18, 2014 12:53 pm

Re: Since 5.3.0 Global Event Handlers not working

Post 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
You do not have the required permissions to view the files attached to this post.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Since 5.3.0 Global Event Handlers not working

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Since 5.3.0 Global Event Handlers not working

Post 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
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Since 5.3.0 Global Event Handlers not working

Post by dwhitfield »

Profile stored internally at T:\Forum Files\mcauble50
mcauble50
Posts: 9
Joined: Tue Nov 18, 2014 12:53 pm

Re: Since 5.3.0 Global Event Handlers not working

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Since 5.3.0 Global Event Handlers not working

Post 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?
Former Nagios Employee
mcauble50
Posts: 9
Joined: Tue Nov 18, 2014 12:53 pm

Re: Since 5.3.0 Global Event Handlers not working

Post 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
mcauble50
Posts: 9
Joined: Tue Nov 18, 2014 12:53 pm

Re: Since 5.3.0 Global Event Handlers not working

Post 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
Locked