Page 1 of 1

change orphaned service return state critical to warning

Posted: Fri Oct 02, 2015 8:40 pm
by yesilyurtav
Hello,
For Nagios Core 4.1.1, orphaned service/hosts are returning critical state. But we want to return warning. Is it possible it to edit source files ?

I realised that, check_for_orphaned_services() function in base/check.c is the resposible of this job, but I couldn't understand/find any variable about return code/message. I see only logs mesages, debugs etc. in this function

Is there anyone to have any idea to change this from source code ?

Thanks.

Re: change orphaned service return state critical to warning

Posted: Mon Oct 05, 2015 4:21 pm
by tmcdonald
There's nothing built-in, we would need to speak to the developers about this.

What is the status output when the orphaned checks come back as critical?

Re: change orphaned service return state critical to warning

Posted: Tue Oct 06, 2015 11:00 am
by yesilyurtav
Hello all,

We are testing mod_gearman with nagios 4.1.1 . The checks are run by worker, when worker is stopped, after a while (10 mins), service or host status are changed to orphaned, message is

HOST ALERT: v...;DOWN;HARD;2;(host check orphaned, is the mod-gearman worker on queue 'hostgroup_....' running?)

We are checking more than 40.000 services, when all workers are stopped, nagios will send 40.000 critical alerts to host/service owners !!! its an unacceptible scenerio.

We want only to trigger warning alert instead of critical. I asked this question developer forum too, waiting for reply.

Regards.

Re: change orphaned service return state critical to warning

Posted: Tue Oct 06, 2015 4:43 pm
by jdalrymple
This is not in the control of Nagios.

https://labs.consol.de/nagios/mod-gearm ... er_options

As far as Nagios goes - it is getting valid results back from mod_gearman. If you would like to change mod_gearman's interpretation of an orphaned check it will have to be done in that module, not in Nagios.
yesilyurtav wrote:We are checking more than 40.000 services, when all workers are stopped, nagios will send 40.000 critical alerts to host/service owners !!! its an unacceptible scenerio.
This can be resolved using server settings from the above posted URL

Re: change orphaned service return state critical to warning

Posted: Tue Nov 03, 2015 8:12 am
by yesilyurtav
I fixed this problem with modifying source code of mod_gearman. I changed neb_module/mod_gearman.c line 522 and line 681 in gearman source code.

Regards.

Re: change orphaned service return state critical to warning

Posted: Tue Nov 03, 2015 10:43 am
by hsmith
Thanks for providing the fix. I'll leave this open for discussion for now, but please don't bump(it messes with our dashboard) unless there is any new information. Thanks!