Configuring Custom Global Event Handler in Nagios

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vaibhav_25
Posts: 3
Joined: Fri Apr 01, 2016 10:12 am

Configuring Custom Global Event Handler in Nagios

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

Re: Configuring Custom Global Event Handler in Nagios

Post 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
You do not have the required permissions to view the files attached to this post.
Former Nagios Employee
vaibhav_25
Posts: 3
Joined: Fri Apr 01, 2016 10:12 am

Re: Configuring Custom Global Event Handler in Nagios

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Configuring Custom Global Event Handler in Nagios

Post by tmcdonald »

Can you post a screenshot of the settings you have in the Global Event Handler config page?
Former Nagios employee
vaibhav_25
Posts: 3
Joined: Fri Apr 01, 2016 10:12 am

Re: Configuring Custom Global Event Handler in Nagios

Post by vaibhav_25 »

Thanks for the reply.
Please see that attached file for details.
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Configuring Custom Global Event Handler in Nagios

Post 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?
Former Nagios Employee
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Configuring Custom Global Event Handler in Nagios

Post 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.
Former Nagios employee
Locked