Active check that stays CRITICAL until resetted

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
Stiuzz
Posts: 9
Joined: Thu Oct 10, 2013 8:24 am

Active check that stays CRITICAL until resetted

Post by Stiuzz »

Hi all,
could someone help me to configure an active check that remains in critical state until resetted (For example using "submit passive check result for this service", or creating a script that submit an external check).

An example of what I need is about uptime, I configured an active check that control uptime (check_uptime.pl) every 5 minutes and go in critical state if uptime is below 60 minutes, but when uptime reach 60 minutes the check go in ok state, I would like to configure this check to stay in critical state until manually resetted.

Do you think that is possible?

Regards
Stiuzz
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Active check that stays CRITICAL until resetted

Post by sreinhardt »

You would need to save information in a temporary file of some sort and validate the last modified time or something of that nature. Can it be done? Yes absolutely. Is the logic built into nagios? Nope, it would have to be logic handled in the plugin.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Stiuzz
Posts: 9
Joined: Thu Oct 10, 2013 8:24 am

Re: Active check that stays CRITICAL until resetted

Post by Stiuzz »

Thankyou Spencer,
I agree with you, just wondering if there was another solution as I don't have much time to spend re/writing script ;)

Regards
Stiuzz
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Active check that stays CRITICAL until resetted

Post by tmcdonald »

Shouldn't be incredibly hard to write actually. We'd be happy to take a look if you can come up with something close to what you need.
Former Nagios employee
wfournier
Posts: 7
Joined: Fri Oct 04, 2013 2:44 am

Re: Active check that stays CRITICAL until resetted

Post by wfournier »

You could write a script that submits a check result *only* on critical. Disable active checks, enable passive. Then it will stay critical until you submit an OK yourself.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Active check that stays CRITICAL until resetted

Post by slansing »

Let us know if you'd like input while writing it.
Locked