possible to change status of dependent checks to unknown?

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
newton_chris
Posts: 2
Joined: Sun May 10, 2015 8:11 pm

possible to change status of dependent checks to unknown?

Post by newton_chris »

I currently have a bunch of service checks that have a "critical" status, and I am trying to figure out the best way to mass temporarily disable them in such a way that the red/critical status goes to "unknown". I'd rather not delete them because I might forget to re-add them.

An example is the check_yum for security updates. I'll wake up in the morning and there will be hundreds of services in critical status.

Ideally, I could set the dependent service to depend on a masters condition like nagios server being in an ok state. Meaning if the nagios server is pingable than don't do the check_yum. This works nearly perfectly in that the dependency works and no more checks are performed against the check_yum service. The problem is that the status stays as the last known status which is "critical". I would like the status to go to "unknown" as soon as the dependency kicks in which will make my nagios console pretty and red/critical free until I fix the check_yum.

My main goal is to keep my monitoring system free of any "critical"/red status to keep the "cry wolf" effect to a minimum. I'm sure someone has a better way to accomplish this.

Thanks!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: possible to change status of dependent checks to unknown

Post by abrist »

Have you though about just deactivating them in the CCM until you are ready to fix them?
Or disabling active checks for the service and then submitting an UNKNOWN passive check?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
newton_chris
Posts: 2
Joined: Sun May 10, 2015 8:11 pm

Re: possible to change status of dependent checks to unknown

Post by newton_chris »

Thanks for the quick response. CCM helped.

I ended up changing:
retain_state_information=0 temporarily

and all dependent alerts start off in pending state instead of the state they were in before the dependency was created and nagios restarted.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: possible to change status of dependent checks to unknown

Post by jdalrymple »

This completely solves your issue and we can lock the topic?
Locked