Page 1 of 1

possible to change status of dependent checks to unknown?

Posted: Sun May 10, 2015 9:07 pm
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!

Re: possible to change status of dependent checks to unknown

Posted: Mon May 11, 2015 12:06 pm
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?

Re: possible to change status of dependent checks to unknown

Posted: Wed May 13, 2015 1:57 pm
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.

Re: possible to change status of dependent checks to unknown

Posted: Wed May 13, 2015 2:28 pm
by jdalrymple
This completely solves your issue and we can lock the topic?