Want to check on my passive check

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
bwestover
Posts: 2
Joined: Mon Jan 10, 2011 12:55 pm

Want to check on my passive check

Post by bwestover »

I have a router that doesn't expose what I need through SNMP. I can get it via SSH, but not very easily.

I built a script that runs via cron on my Nagios server, that will retrieve the data I need, process it and then send a passive service check to the nagios.cmd file.

It's working.

The problem I'm having, is how to monitor that this passive check is functioning. If it hasn't ran, say in the last hour, I'd like to receive an alert.

One method I've tried:
What I've done is enabled active checks for the same service to run every hour. It just sets a warning state every time using the check_dummy plugin.

Since the passive check runs every ten minutes, its only a few minutes until the warning state gets overwritten by my passive check. I have the check_interval and retry_interval on the service set to 60 minutes. max_check_attempts is 3. So, if my passive check script dies, in three hours I'll get a notification, which suits me just fine. (It's a redundant service that its checking, so I don't need to know RIGHT away.)

The problem with this method is that I get an alert on the console every hour, for at least a few minutes until the passive check comes along and clears it. I'd rather not muddy up my logs with alerts that aren't REAL, and I don't want to have to look at alerts on the console that aren't REAL, even if its only for a few minutes (every hour).

Does anyone know of a better way to check that my passive check is running, and has returned data recently enough?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Want to check on my passive check

Post by mguthrie »

I'm not a pro with passive checks, but I believe that's what the "check_freshness" check is for. It checks the "last update" time against a threshold that you set.
bwestover
Posts: 2
Joined: Mon Jan 10, 2011 12:55 pm

Re: Want to check on my passive check

Post by bwestover »

Yes!

That is what I needed. Thank you.

If any else needs it, I found the documentation for Service and Host Freshness Checks:

http://nagios.sourceforge.net/docs/3_0/freshness.html
Locked