Page 1 of 1
When Mod-Gearman Workers are DOWN/UNREACHABLE
Posted: Thu Dec 27, 2018 12:50 pm
by jaimie.livingston
Is there a way to setup Mod-Gearman such that any services being checked by mod-gearman workers are set to UNKNOWN when the worker is down or unreachable? I'm sure this is somewhere in the docs, but I just cannot find the answer...
Thanks,
Jaimie Livingston
Re: When Mod-Gearman Workers are DOWN/UNREACHABLE
Posted: Thu Dec 27, 2018 2:37 pm
by tgriep
In the Mod Gearman server config file "module.conf" there are options you can set to have the Gearman server detect that a worker is down and to return an unknown.
If you edit the module.conf file and set the following options to the example below, you should receive unknowns.
Code: Select all
# The Mod-Gearman NEB module will submit a fake result for orphaned host
# checks with a message saying there is no worker running for this
# queue. Use this option to get better reporting results, otherwise your
# hosts will keep their last state as long as there is no worker
# running.
# Default: yes
orphan_host_checks=yes
# Same like 'orphan_host_checks' but for services.
# Default: yes
orphan_service_checks=yes
# orphan_return
# Set return code of orphaned checks. Possible values are:
# 0 - OK
# 1 - WARNING
# 2 - CRITICAL
# 3 - UNKNOWN
# Default is 2.
orphan_return=3
Remember to restart the Gearman server after the change.
Re: When Mod-Gearman Workers are DOWN/UNREACHABLE
Posted: Thu Dec 27, 2018 3:35 pm
by jaimie.livingston
Thanks for the tip, but I do already have those values set, but when the Mod-Gearman workers are DOWN, the MG queue just fill, and the services remain in whatever state they were in before the workers went DOWN.
I also don't see/haven't found a way to force the status to UNKNOWN for services that are queued but have no available worker.
Thanks,
Jaimie
Re: When Mod-Gearman Workers are DOWN/UNREACHABLE
Posted: Thu Dec 27, 2018 4:19 pm
by tgriep
The queues filling up when the worker is down is normal.
I took a look at the Mod Gearman changelog and found a few bugs that were fixed in newer versions of Mod Gearman that may fix this issue.
Problem is that there is a compatibility issue with the Newer Nagios Core and Mod Gearman that has not been resolved yet so you cannot install the latest version of Mod Gearman.