Soft State - handled as Normal

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
enterdavertex
Posts: 10
Joined: Fri Aug 23, 2013 10:12 am

Soft State - handled as Normal

Post by enterdavertex »

Hi there , We have a machine that is going down too many time (Internet problem for this host). I was looking to get an option to set this machine as normal so that he won't pop into Nagios as Critical. If this is possible i would really like to know this options.

Thank you very much in advance !
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Soft State - handled as Normal

Post by abrist »

You could use the negate plugin to change critical to warning or ok. This will change the availability metrics/historical data for the host, because future checks will be seen as ok instead of critical.
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.
enterdavertex
Posts: 10
Joined: Fri Aug 23, 2013 10:12 am

Re: Soft State - handled as Normal

Post by enterdavertex »

abrist wrote:You could use the negate plugin to change critical to warning or ok. This will change the availability metrics/historical data for the host, because future checks will be seen as ok instead of critical.
Where can i get this plugin, i searched on Nagios Exchange & the library and it seems it cannot be found..
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Soft State - handled as Normal

Post by tmcdonald »

It should be /usr/local/nagios/libexec/negate

Code: Select all

Usage:
negate [-t timeout] [-Towcu STATE] [-s] <definition of wrapped plugin>
negate -h for more help output.
Former Nagios employee
enterdavertex
Posts: 10
Joined: Fri Aug 23, 2013 10:12 am

Re: Soft State - handled as Normal

Post by enterdavertex »

I've read about this way to proceed, is there a way to manage if the host is not recheable in like 40 check then after if change status. Otherwise the only way to do is that the soft state are considered as Ok even if the host is not present.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Soft State - handled as Normal

Post by sreinhardt »

negate does not offer the ability to change the state to its original state after x number of retries. It only works off the current check results and does not store data about previous ones. Yes and no, what you should really be doing is using flapping conditions for that host\service. Otherwise a soft state for your 40 some retries, so that you can extend the time between hard ok and hard warn\crit will have a similar effect of limiting notifications.
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.
Locked