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"?
mod_gearman integration
Re: mod_gearman integration
I did some more digging into this and testing, and I need to revise what I said. Even though, setting up:
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:
In the worker.conf on the gearman server:
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
This way, the checks in the queue will run ONLY on the remote worker. All of the rest of the checks will run locally.
Code: Select all
services=no
hosts=noIn 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=MyServicegroupCode: Select all
services=yes
hosts=yesIn 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=MyServicegroupBe sure to check out our Knowledgebase for helpful articles and solutions!