Page 1 of 1

Configuring Custom Global Event Handler in Nagios

Posted: Fri Apr 01, 2016 10:20 am
by vaibhav_25
Hello there,

I am having installed the Nagios version (5.2.3) installed in our project development environment.

For our business related requirement we need to achieve following;
a) I need to have our own Global Event Handlers configured for integration with 3rd Party Application.
Nagios.cfg file (/usr/local/nagios/etc/nagios.cfg)

Existing :
# GLOBAL EVENT HANDLERS - existing
global_host_event_handler=xi_host_event_handler
global_service_event_handler=xi_service_event_handler

To Be changed to :
# GLOBAL EVENT HANDLERS - existing
global_host_event_handler=custom_host_event_handler
global_service_event_handler=custom_service_event_handler

I need to understand if we can add our own custom handler as Global Event Handler;
Question : does this will have any impact on current implementation of “xi_host_event_handler” and “xi_service_event_handler” respectivey.
OR How can we keep both i.e. “xi_host_event_handler” and “custom_host_event_handler” event handler as Global Event Handlers.
Please suggest if there is any configuration for the same.

Any quick response on this will be highly appreciated as it's impacting the project activities badly.

Many Thanks,
Vaibhav Dhopte

Mod Note: I have moved your post from the Nagios Ideas section to the Nagios XI section.

Re: Configuring Custom Global Event Handler in Nagios

Posted: Fri Apr 01, 2016 10:32 am
by rkennedy
There is actually a component built in for this to Nagios XI. Navigate to Admin -> Manage Components -> Global Event Handlers -> Click the wrench icon to edit. You'll see a place to modify them accordingly.
global-event-handlers.PNG
See this document for more information - https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: Configuring Custom Global Event Handler in Nagios

Posted: Sun Apr 03, 2016 12:37 am
by vaibhav_25
Thanks for the reply. I did try making changes through UI as you suggested but my event handler is not getting fired.
After making the changes through UI; I restart the nagios service on the server.
I can't see anything related to my global event handler in the logs.

Please suggest if I am missing anything over here.

Many Thanks,
Vaibhav Dhopte

Re: Configuring Custom Global Event Handler in Nagios

Posted: Mon Apr 04, 2016 1:11 pm
by tmcdonald
Can you post a screenshot of the settings you have in the Global Event Handler config page?

Re: Configuring Custom Global Event Handler in Nagios

Posted: Tue Apr 05, 2016 1:37 am
by vaibhav_25
Thanks for the reply.
Please see that attached file for details.

Re: Configuring Custom Global Event Handler in Nagios

Posted: Tue Apr 05, 2016 9:22 am
by rkennedy
What are the permissions on the file it's trying execute? ls -l /usr/local/nagios/libexec/send-host-event.sh

Also, do you have states changing on your XI machine? Can you please post your /usr/local/nagios/var/nagios.log file?

Re: Configuring Custom Global Event Handler in Nagios

Posted: Tue Apr 05, 2016 9:25 am
by tmcdonald
Also, have you opened a ticket for this? I saw an almost identical email come in, but it doesn't match your email address on file.