mod_gearman integration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
bchabotdg
Posts: 34
Joined: Wed Aug 16, 2017 2:33 pm

Re: mod_gearman integration

Post by bchabotdg »

So do I need to specify a second hostgroup and a second servicegroup for services handled on the local server?

Can I specify no for services and hosts on the local box and not specify a hostgroup and servicefroup so as to indicate "Handle everything else locally"?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: mod_gearman integration

Post by lmiltchev »

I did some more digging into this and testing, and I need to revise what I said. Even though, setting up:

Code: Select all

services=no
hosts=no
would work, the checks that are not put in queues won't be run by mod_gearman by only by nagios. So, a better solution would be:

In the module.conf on the gearman server:

Code: Select all

services=yes
hosts=yes
# Specify hostgroups and servicesgroups that you want to put in a queue, and run on the remote worker
hostgroups=MyHostgroup
servicegroups=MyServicegroup
In the worker.conf on the gearman server:

Code: Select all

services=yes
hosts=yes
You don't need to specify hostgroups or servicegroups here, and most definitely, you should not specify here hostgroups/servicegroups checks that need to be run remotely!

In the worker.conf on the remote worker:

# Make sure these are set to "no", so that only hostgroups/servicegroups in your queue would run

Code: Select all

services=no
hosts=no
# Specify hostgroup/servicegroup checks to be run
hostgroups=MyHostgroup
servicegroups=MyServicegroup
This way, the checks in the queue will run ONLY on the remote worker. All of the rest of the checks will run locally.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked