EventHandler on Distribute Nagios XI - GEARMAN
EventHandler on Distribute Nagios XI - GEARMAN
Hello everyone! I'm using the architecture above on Nagios XI. Every hostgroup have it's own worker and it's on a different network.
I'm trying to use eventhandlers but mod_gearman doesn't send those checks to the worker, only service and host. This is a limitation? Am I doing something wrong?
The integration was made using the following guide: https://assets.nagios.com/downloads/nag ... ios_XI.pdf
The integration was made using the following guide: https://assets.nagios.com/downloads/nag ... ios_XI.pdf
You do not have the required permissions to view the files attached to this post.
Re: EventHandler on Distribute Nagios XI - GEARMAN
It should work if you edit the nagios.cfg file and edit the broker line to change eventhandler to yes like below.
You will have to restart the Nagios process, Gearman server and workers for it to be taken in effect.
Remember, all of the remote work's will also have to be able to run the eventhandlers so they will need to be configured before hand.
Code: Select all
broker_module=/usr/lib/mod_gearman/mod_gearman.o config=/etc/mod_gearman/mod_gearman_neb.conf eventhandler=yesRemember, all of the remote work's will also have to be able to run the eventhandlers so they will need to be configured before hand.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: EventHandler on Distribute Nagios XI - GEARMAN
You are telling that the worker must know the script of the eventhandler or that I must also alter eventhander property from:tgriep wrote:all of the remote work's will also have to be able to run the eventhandlers so they will need to be configured before hand.
eventhandler=no
to:
eventhandler=yes
on every single worker?
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: EventHandler on Distribute Nagios XI - GEARMAN
Yes, an event handler is run locally, in the context of a gearman worker, locally means on the server hosting the worker.lb2cons wrote:worker must know the script of the eventhandler
This also - not every single worker, but every one that you want to process event handlers.lb2cons wrote:or that I must also alter eventhander property from:
eventhandler=no
to:
eventhandler=yes
on every single worker?
Re: EventHandler on Distribute Nagios XI - GEARMAN
Ok, got it. I'll try this as soon as possible.
Re: EventHandler on Distribute Nagios XI - GEARMAN
Let us know if you need any more help.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: EventHandler on Distribute Nagios XI - GEARMAN
It was already configured. Check my broker config:
broker_module=/usr/lib64/mod_gearman/mod_gearman.o key=mykey server=myIP eventhandler=yes hosts=yes services=yes hostgroups=ABC,XXX,YYY
Worker:
eventhandler=yes
services=no
hosts=no
hostgroups=ABC
It's ok right? It's not working.
broker_module=/usr/lib64/mod_gearman/mod_gearman.o key=mykey server=myIP eventhandler=yes hosts=yes services=yes hostgroups=ABC,XXX,YYY
Worker:
eventhandler=yes
services=no
hosts=no
hostgroups=ABC
It's ok right? It's not working.
Re: EventHandler on Distribute Nagios XI - GEARMAN
Check and see if eventhandler=yes is set in the gearmand server config file.
If it isn't, set it to yes and restart the gearmand server.
If it still isn't working, take a look at the log files in /var/log/mod_gearman/ folder and post any errors here.
Code: Select all
/etc/mod_gearman/mod_gearman_neb.confIf it still isn't working, take a look at the log files in /var/log/mod_gearman/ folder and post any errors here.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: EventHandler on Distribute Nagios XI - GEARMAN
Yes it's eventhandler=yes on both /etc/mod_gearman/mod_gearman_neb.conf Nagios Server and on the worker.
I've debugged here, there is no error log on Worker nor in gearmand. The eventhandler it's been executed but by the local worker (Inside the Nagios XI Server)
I've debugged here, there is no error log on Worker nor in gearmand. The eventhandler it's been executed but by the local worker (Inside the Nagios XI Server)
Re: EventHandler on Distribute Nagios XI - GEARMAN
On your gearman server, usually this is the XI system, can you run the following command to view the workers that are connected to it and also in the eventhandler worker is connected to the server?
The output of the gearman_top should look something like below showing the eventandler is connected to the queue.
Code: Select all
gearman_topCode: Select all
+---------------+------------------+--------------+--------------+
| Queue Name | Worker Available | Jobs Waiting | Jobs Running |
+---------------+------------------+--------------+--------------+
| check_results | 1 | 0 | 0 |
| eventhandler | 50 | 0 | 0 |
| host | 50 | 0 | 1 |
| service | 50 | 0 | 13 |
+---------------+------------------+--------------+--------------+Be sure to check out our Knowledgebase for helpful articles and solutions!