change orphaned service return state critical to warning

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
yesilyurtav
Posts: 16
Joined: Mon Jun 08, 2015 11:28 am

change orphaned service return state critical to warning

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: change orphaned service return state critical to warning

Post 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?
Former Nagios employee
yesilyurtav
Posts: 16
Joined: Mon Jun 08, 2015 11:28 am

Re: change orphaned service return state critical to warning

Post 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.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: change orphaned service return state critical to warning

Post 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
yesilyurtav
Posts: 16
Joined: Mon Jun 08, 2015 11:28 am

Re: change orphaned service return state critical to warning

Post 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.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: change orphaned service return state critical to warning

Post 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!
Former Nagios Employee.
me.
Locked