<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16608" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=531310111-08012010>We use the following check to ensure that a backup has
completed. The backup job calls in success (or fail) at the end, and runs every
day (86,400 seconds). The freshness_threshold</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=531310111-08012010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=531310111-08012010>The backupFailed check command contains the folllowing.
Note that normally active checks are disabled, however the check_freshness and
freshness_threshold will triger an active check after n time intervals
(93,600 * 1second in my case).</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=531310111-08012010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=531310111-08012010>This is nagios 2, so YMMV</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=531310111-08012010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=531310111-08012010>define service{</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2>
use <SPAN
class=531310111-08012010>defaultservice</SPAN><BR>
host_name <SPAN
class=531310111-08012010>myhost</SPAN><BR>
service_description
Nightly <SPAN
class=531310111-08012010>Backup</SPAN><BR>
active_checks_enabled
0<BR>
passive_checks_enabled
1<BR>
check_freshness
1<BR>
freshness_threshold
93600<BR>
max_check_attempts
1<BR>
check_command
backupFailed</FONT></DIV>
<DIV dir=ltr align=left><FONT><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN
class=531310111-08012010></SPAN>}<BR></FONT></FONT></FONT></DIV></FONT>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>define
command{<BR>
command_name
backupFailed<BR>
command_line $USER1$/reportError 2 "The backup on
$HOSTADDRESS$ failed to report in time"<BR>}<BR></DIV></FONT>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=531310111-08012010>With reportError being a bash
script:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=531310111-08012010>#!/bin/bash<BR>echo $2<BR>exit
$1<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV><!-- Converted from text/rtf format -->
<P dir=ltr><SPAN lang=en-gb><B></B></SPAN><SPAN lang=en-gb><B><FONT face=Arial
size=2>--</FONT></B></SPAN><SPAN lang=en-gb></SPAN></P>
<P dir=ltr><SPAN lang=en-gb><I><FONT face="Times New Roman">What's with all the
carrots? What do they need such good eyesight for anyway?</FONT></I></SPAN><SPAN
lang=en-gb><I><BR></I><B></B></SPAN><SPAN lang=en-gb><B><BR><FONT face=Arial
size=2>Paul Weaver </FONT></B></SPAN><SPAN
lang=en-gb><B><BR></B></SPAN><SPAN lang=en-gb><FONT face=Arial size=2>Systems
Development Engineer</FONT></SPAN><SPAN lang=en-gb><BR></SPAN><SPAN
lang=en-gb><FONT face=Arial size=2>BBC FM&T BETG TDD SDT</FONT></SPAN><SPAN
lang=en-gb><B><FONT face=Arial></FONT></B></SPAN><SPAN
lang=en-gb><B></B></SPAN><SPAN lang=en-gb><B> <FONT face=Arial
size=2></FONT></B></SPAN><SPAN lang=en-gb><BR><B></B></SPAN><SPAN
lang=en-gb><B><FONT face=Arial size=2>Work: </FONT></B></SPAN><SPAN
lang=en-gb></SPAN><SPAN lang=en-gb> <FONT face=Arial
size=2>020 822</FONT></SPAN><SPAN lang=en-gb><B></B></SPAN><SPAN
lang=en-gb><B><FONT face=Arial size=2>5 8109<BR><B></B></SPAN><SPAN
lang=en-gb><B><FONT face=Arial size=2>Mobile: </FONT></B></SPAN><SPAN
lang=en-gb></SPAN><SPAN lang=en-gb> <FONT face=Arial size=2>07736
481006</FONT></SPAN><SPAN lang=en-gb><B></B></SPAN><SPAN lang=en-gb><B><FONT
face=Arial size=2><BR>Room 1244, BBC Television
Centre,</FONT></B></SPAN><SPAN lang=en-gb><BR></SPAN><SPAN lang=en-gb><FONT
face=Arial size=2>Wood Lane, London, W12 7RJ</FONT></SPAN><SPAN
lang=en-gb></SPAN></P>
<P dir=ltr><SPAN lang=en-gb><I></I></SPAN></P></FONT></B>
<DIV> </DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Pankaj [mailto:penguinhead@gmail.com]
<BR><B>Sent:</B> 08 January 2010 07:30<BR><B>To:</B> Nagios
Mailinglist<BR><B>Subject:</B> [Nagios-users] non sticky passive
checks<BR></FONT><BR></DIV>
<DIV></DIV>Hi,<BR><BR>I've configured passive service checks and am reporting
back the results using nsca. I would like to turn the alerts to be critical
after 5 minutes if the monitored servers fail to send any results. Currently
the check continues to remain in the last state. How can I achieve
this?<BR><BR>>>>>>>>>>>> service_common.cfg
<BR> define
service{<BR>
use
generic_service<BR>
name
passive_service<BR>
active_checks_enabled
0<BR>
passive_checks_enabled
1
<BR>
flap_detection_enabled
0<BR>
register
0
<BR>
is_volatile
0<BR>
check_period
24x7<BR>
max_check_attempts
1<BR>
normal_check_interval
5<BR>
retry_check_interval
1<BR>
check_freshness
0<BR>
contact_groups admins
<BR>
check_command
check_dummy!0<BR>
notification_interval
120<BR>
notification_period
24x7<BR>
notification_options
w,u,c,r<BR>
stalking_options w,c,u <BR>}<BR><BR
clear=all>define service
{<BR>
use
passive_service<BR>
service_description HW
Sensors<BR>
hostgroup_name
hgp_webservers, hgp_db, hgp_search,
hgp_image<BR>
check_command
check_dummy<BR>
active_checks_enabled
0<BR>
passive_checks_enabled
1<BR>}<BR><BR>define command{<BR>
command_name check_dummy<BR>
command_line $USER1$/check_dummy $ARG1$<BR>}<BR><BR><BR>-- <BR>( 2b || ! 2b
)<BR></BLOCKQUOTE></BODY></HTML>