Feature request, notifications from critical t o warning

atonns at mail.ivillage.com atonns at mail.ivillage.com
Tue Jan 20 20:11:52 CET 2004


This was fixed back in December:

http://article.gmane.org/gmane.network.nagios.devel/488

I believe the diffs to the code were as below, but you should double check
CVS.

--
"Computer science is as much about computers as
        astronomy is about telescopes" -- Edsger Dijkstra
---------------------------------------------------------
Anthony Tonns, UNIX Administrator - atonns at mail.ivillage.com


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

--- code snippet ---

diff -ur nagios-1.1-orig/base/checks.c nagios-1.1/base/checks.c
--- nagios-1.1-orig/base/checks.c       Sun Nov 17 20:15:13 2002
+++ nagios-1.1/base/checks.c    Fri Dec 12 12:57:31 2003
@@ -784,6 +784,7 @@

                        temp_service->last_notification=(time_t)0;
                        temp_service->next_notification=(time_t)0;
+                       temp_service->no_more_notifications=FALSE;
                        temp_service->problem_has_been_acknowledged=FALSE;

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

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

        /* set the state flags in case we "float" between down and
unreachable states before a recovery */
        if(state_type==HARD_STATE){
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20040120/8d1de5a7/attachment.html>


More information about the Developers mailing list