When Mod-Gearman Workers are DOWN/UNREACHABLE

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jaimie.livingston
Posts: 59
Joined: Wed Nov 23, 2016 10:41 am

When Mod-Gearman Workers are DOWN/UNREACHABLE

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: When Mod-Gearman Workers are DOWN/UNREACHABLE

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jaimie.livingston
Posts: 59
Joined: Wed Nov 23, 2016 10:41 am

Re: When Mod-Gearman Workers are DOWN/UNREACHABLE

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: When Mod-Gearman Workers are DOWN/UNREACHABLE

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked