Re: [Nagios-users] passive service and notification email

2010-10-27 Thread diego . roccia
Freshness threshold is the word :)
Sent from my BlackBerry® wireless device

-Original Message-
From: Andrea Imparato imparato.and...@gmail.com
Date: Tue, 26 Oct 2010 11:09:26 
To: nagios-users@lists.sourceforge.net
Reply-To: Nagios Users List nagios-users@lists.sourceforge.net
Subject: [Nagios-users] passive service and notification email

Hello to all ml,


I have a simple request for you. I have a passive service check
scheduled on my nagios server and a cron script on my clients (they are
all natted) that send me the informations. The question is: which is the
parameter for nagios that say after some period send me an email if you
see nothing happens?. Sorry but I found the documentation a bit
chaotic :\

Thank you


--
Nokia and ATT present the 2010 Calling All Innovators-North America contest
Create new apps  games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null
--
Nokia and ATT present the 2010 Calling All Innovators-North America contest
Create new apps  games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] passive service and notification email

2010-10-26 Thread Jim Avery
On 26 October 2010 10:09, Andrea Imparato imparato.and...@gmail.com wrote:
 Hello to all ml,


 I have a simple request for you. I have a passive service check
 scheduled on my nagios server and a cron script on my clients (they are
 all natted) that send me the informations. The question is: which is the
 parameter for nagios that say after some period send me an email if you
 see nothing happens?. Sorry but I found the documentation a bit
 chaotic :\

See:

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

So the important bits are ...

Make sure it's a passive check:

active_checks_enabled   0
passive_checks_enabled  1

Check whether a fresh check has been received recently:

check_freshness 1
freshness_threshold 93600

Run this this if not fresh:

check_command   no-backup-report


In this case, instead of a normal check command, you have a command
defined which will always give you a non-ok warning:

define command{
command_nameno-backup-report
command_line/usr/local/nagios/libexec/check_dummy 2 CRITICAL:
Results of backup job were not reported!
}

Note the check_dummy plugin takes two arguments - the exit code you
want it to return (0=ok, 1=warning, 2=critical, 3=unknown) and the
check result text you want Nagios to display.

I normally do something similar, but with pedantically correct text like so:

define command{
command_namecheck_dummy-checkfail
command_line/usr/local/nagios/libexec/check_dummy 3 UNKNOWN: Nagios
didn't receive a check result from the cron job on this server!
}

Whether you choose to use warning, critical or unknown is up to you.

hth,

Jim

--
Nokia and ATT present the 2010 Calling All Innovators-North America contest
Create new apps  games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null