check_freshness sends false positive alerts

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
madsantos
Posts: 18
Joined: Fri Apr 27, 2018 5:26 am

check_freshness sends false positive alerts

Post by madsantos »

I've been passive checking a network with Nagios Core. Some days ago, there was a power outage and since the machine that active checks the network was down as well, I got no "host down" alerts. That almost got me a real problem with clients. Since then, I've been trying to monitor these power outages with the check_freshness option, wish has been acting weirdly (or I've been figuring it all wrong).

I'm using check_freshness on the service Uptime, which is checked every minute. If I edit freshness_threshold = 5, I don't get a critical after 5 seconds of not receiving a new check; instead, I my Uptime service just stays critical for a lot of the time, displaying a (No output on stdout) stderr: execvp(a, ...) failed. errno is 2: No such file or directory message. I guessed it was very little time for the threshold, so I increased it to 70. Now, my Uptime service changes to critical after the machine is down for 2/3 minutes, but sometimes it displays a crit (and consequently it warns me over email) for apparently no reason. The message displayed is always the same, whether the machine is really down or it's a false positive.

Am I doing it wrong? How can I edit the passive check to display a critical whenever the Nagios machine on the network is also down, in the minimal time possible? Thank you.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_freshness sends false positive alerts

Post by scottwilkerson »

You would need to also set a check command for the service, this command will be executed when the freshness check kicks off. Because this is a passive check, Nagios cannot trigger the actual check, that happens from the remote side, so many people use check_dummy to give a notice.

But really a 5 second check_freshness is a really bad idea in conjunction with passive checks....

Common usage is to set the freshness seconds higher than when you expect to receive results from the remote server and then have the message say you didn't receive the results
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
madsantos
Posts: 18
Joined: Fri Apr 27, 2018 5:26 am

Re: check_freshness sends false positive alerts

Post by madsantos »

scottwilkerson wrote:You would need to also set a check command for the service, this command will be executed when the freshness check kicks off. Because this is a passive check, Nagios cannot trigger the actual check, that happens from the remote side, so many people use check_dummy to give a notice.

But really a 5 second check_freshness is a really bad idea in conjunction with passive checks....

Common usage is to set the freshness seconds higher than when you expect to receive results from the remote server and then have the message say you didn't receive the results
The check_dummy command did the trick. I misconceived the freshness_threshold at first, but now I have no problems using it. Thank you Scott.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_freshness sends false positive alerts

Post by scottwilkerson »

madsantos wrote:
scottwilkerson wrote:You would need to also set a check command for the service, this command will be executed when the freshness check kicks off. Because this is a passive check, Nagios cannot trigger the actual check, that happens from the remote side, so many people use check_dummy to give a notice.

But really a 5 second check_freshness is a really bad idea in conjunction with passive checks....

Common usage is to set the freshness seconds higher than when you expect to receive results from the remote server and then have the message say you didn't receive the results
The check_dummy command did the trick. I misconceived the freshness_threshold at first, but now I have no problems using it. Thank you Scott.
Glad it is solved.

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked