<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [Nagios-devel] Feature request, notifications from critical to warning</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>This was fixed back in December:</FONT>
</P>

<P><FONT SIZE=2><A HREF="http://article.gmane.org/gmane.network.nagios.devel/488" TARGET="_blank">http://article.gmane.org/gmane.network.nagios.devel/488</A></FONT>
</P>

<P><FONT SIZE=2>I believe the diffs to the code were as below, but you should double check CVS.</FONT>
</P>

<P><FONT SIZE=2>--</FONT>
<BR><FONT SIZE=2>"Computer science is as much about computers as</FONT>
<BR><FONT SIZE=2>        astronomy is about telescopes" -- Edsger Dijkstra</FONT>
<BR><FONT SIZE=2>---------------------------------------------------------</FONT>
<BR><FONT SIZE=2>Anthony Tonns, UNIX Administrator - atonns@mail.ivillage.com</FONT>
</P>
<BR>

<P><FONT SIZE=2>> -----Original Message-----</FONT>
<BR><FONT SIZE=2>> From: ForMatPrO ForMatPrO [<A HREF="mailto:formatpro@yahoo.co.uk">mailto:formatpro@yahoo.co.uk</A>]</FONT>
<BR><FONT SIZE=2>> Sent: Saturday, January 17, 2004 9:56 AM</FONT>
<BR><FONT SIZE=2>> To: nagios-devel@lists.sourceforge.net</FONT>
<BR><FONT SIZE=2>> Subject: [Nagios-devel] Feature request, notifications from </FONT>
<BR><FONT SIZE=2>> critical to</FONT>
<BR><FONT SIZE=2>> warning</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I don't think it is possible yet to get a notification</FONT>
<BR><FONT SIZE=2>> alert when a service escalates from warning to</FONT>
<BR><FONT SIZE=2>> critical if you set the notifications_interval to 0. </FONT>
<BR><FONT SIZE=2>> Would it be possible to create an option that forces a</FONT>
<BR><FONT SIZE=2>> notification alert if a service changes from warning</FONT>
<BR><FONT SIZE=2>> to critical?</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> We've set the notification_interval to 0 because we</FONT>
<BR><FONT SIZE=2>> don't like to get repeating SMS messages if a service</FONT>
<BR><FONT SIZE=2>> remains on a warning or critical state.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Thx.</FONT>
</P>

<P><FONT SIZE=2>--- code snippet ---</FONT>
</P>

<P><FONT SIZE=2>diff -ur nagios-1.1-orig/base/checks.c nagios-1.1/base/checks.c</FONT>
<BR><FONT SIZE=2>--- nagios-1.1-orig/base/checks.c       Sun Nov 17 20:15:13 2002</FONT>
<BR><FONT SIZE=2>+++ nagios-1.1/base/checks.c    Fri Dec 12 12:57:31 2003</FONT>
<BR><FONT SIZE=2>@@ -784,6 +784,7 @@</FONT>
</P>

<P><FONT SIZE=2>                        temp_service->last_notification=(time_t)0;</FONT>
<BR><FONT SIZE=2>                        temp_service->next_notification=(time_t)0;</FONT>
<BR><FONT SIZE=2>+                       temp_service->no_more_notifications=FALSE;</FONT>
<BR><FONT SIZE=2>                        temp_service->problem_has_been_acknowledged=FALSE;</FONT>
</P>

<P><FONT SIZE=2>                        /* do NOT reset current notification number!!! */</FONT>
<BR><FONT SIZE=2>diff -ur nagios-1.1-orig/base/notifications.c nagios-1.1/base/notifications.c</FONT>
<BR><FONT SIZE=2>--- nagios-1.1-orig/base/notifications.c    Sat Aug 31 10:38:31 2002</FONT>
<BR><FONT SIZE=2>+++ nagios-1.1/base/notifications.c Fri Dec 12 12:58:18 2003</FONT>
<BR><FONT SIZE=2>@@ -1397,6 +1397,8 @@</FONT>
<BR><FONT SIZE=2>    /* if notification interval is 0, we shouldn't send any more problem notifications */</FONT>
<BR><FONT SIZE=2>    if(interval_to_use==0)</FONT>
<BR><FONT SIZE=2>        svc->no_more_notifications=TRUE;</FONT>
<BR><FONT SIZE=2>+   else</FONT>
<BR><FONT SIZE=2>+       svc->no_more_notifications=FALSE;</FONT>
</P>

<P><FONT SIZE=2> #ifdef DEBUG4</FONT>
<BR><FONT SIZE=2>    printf("\tInterval used for calculating next valid notification time: %d\n",interval_to_use);</FONT>
<BR><FONT SIZE=2>diff -ur nagios-1.1-orig/base/sehandlers.c nagios-1.1/base/sehandlers.c</FONT>
<BR><FONT SIZE=2>--- nagios-1.1-orig/base/sehandlers.c   Thu Oct 17 20:07:05 2002</FONT>
<BR><FONT SIZE=2>+++ nagios-1.1/base/sehandlers.c    Fri Dec 12 12:59:13 2003</FONT>
<BR><FONT SIZE=2>@@ -592,6 +592,7 @@</FONT>
<BR><FONT SIZE=2>        /* reset the next and last notification times */</FONT>
<BR><FONT SIZE=2>        hst->last_host_notification=(time_t)0;</FONT>
<BR><FONT SIZE=2>        hst->next_host_notification=(time_t)0;</FONT>
<BR><FONT SIZE=2>+       hst->no_more_notifications=FALSE;</FONT>
</P>

<P><FONT SIZE=2>        /* set the state flags in case we "float" between down and unreachable states before a recovery */</FONT>
<BR><FONT SIZE=2>        if(state_type==HARD_STATE){</FONT>
<BR><FONT SIZE=2>iVillage Inc., 500 Seventh Avenue, New York, NY 10018 -  iVillage Inc. is a leading women's media company that includes iVillage.com, Women.com, gURL.com, Astrology.com, Promotions.com, iVillage Parenting Network, The Newborn Channel, Lamaze Publishing, Business Women's Network, Diversity Best Practices, Best Practices in Corporate Communications, and iVillage Consulting.  The information contained in this communication may be confidential, is intended only for the use of the recipient named above, and may be construed under applicable law to be a commercial email.  If you have received this communication in error, please delete this message from your computer system.  If you are the recipient named above and do not wish to receive any future commercial emails, please reply to the sender with a message stating such preference.</FONT></P>

</BODY>
</HTML>