Eventhandler in Distrubuted Nagios (Mod_Gearman)

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
huaming
Posts: 26
Joined: Thu Jan 16, 2020 3:49 am

Eventhandler in Distrubuted Nagios (Mod_Gearman)

Post by huaming »

Hi All,

I met a problem on distributed Nagios, deployed by mod_gearman. I built a eventhandler for a certain service (check windows service), if this windows service stopped, this eventhandler will start it. HOwever, this eventhandler only work at Nagios Master ( with Mod_gearman module installed), not work on those workers. I am wondering I can seek some support/suggestions.

THanks.

Below is my configuration on /etc/mod_gearman/module.cfg at Nagios Master

#Mod-Gearman NEB Module Config
eventhandler=no
notifications=no
services=yes
hosts=yes
hostgroups=XXX_Host_Group,YYY_Host_Group,ZZZ_Host_Group
servicegroups=XXX_Service_Group,YYY_Service_Group,ZZZ_Service_Group

do_hostchecks=yes
route_eventhandler_like_checks=yes
encryption=yes
mum length is 32 characters.
key=******
use_uniq_jobs=on

This is configuration on /etc/mod_gearman/worker.cfg at Nagios slave

#Mod-Gearman NEB Module Config
eventhandler=yes
notifications=no
services=no
hosts=no
hostgroups=XXX_Host_Group
servicegroups=XXX_Service_Group
IPOInS
Posts: 25
Joined: Tue Jan 14, 2020 6:08 am

Re: Eventhandler in Distrubuted Nagios (Mod_Gearman)

Post by IPOInS »

Does the plugin/script exist in the libexec folder of the slave server?
huaming
Posts: 26
Joined: Thu Jan 16, 2020 3:49 am

Re: Eventhandler in Distrubuted Nagios (Mod_Gearman)

Post by huaming »

Thanks for reply.

Yes, I put the same script at slave server. And there is no error shown in nagios.log at slave server. I ran the test for this script at slave server with successful result. :(
IPOInS
Posts: 25
Joined: Tue Jan 14, 2020 6:08 am

Re: Eventhandler in Distrubuted Nagios (Mod_Gearman)

Post by IPOInS »

Hi Huaming,

here's a couple of other things to check:
Firstly the module.conf, you want eventhandler enabled so that it gets placed into the mod_gearman queue for workers to pick up.
The other thing is check your nagios.cfg and see if eventhandler is enabled for the value broker_module.
Locked