Possible bug in timeperiod parsing

Kim Klinkhamer KlinkhamerK at landcareresearch.co.nz
Tue Dec 16 21:18:18 CET 2008


On Tue, 2008-12-16 10:44:14 GMT, matthias eble wrote:


> In general, this should work. Which Nagios version are you using?

> If you're using Nagios 3: Have you tried to set up debugging for

> notifications in nagios.cfg?



You are correct, it should work, but it is ignoring the time periods for SMS messages, i.e. they go out 24x7.

I'm using Nagios 3.0.6.  I enabled debugging with verbosity set to level 2, and when a recovery notification went out, the log looks like this (edited a bit)

[1229456867.888599] [032.0] [pid=27002] ** Host Notification Attempt ** Host: 'server', Type: 0, Options: 0, Current State:
 0, Last Notification: Thu Jan  1 12:00:00 1970
[1229456867.888699] [032.0] [pid=27002] Notification viability test passed.
[1229456867.888738] [032.1] [pid=27002] Current notification number: 2 (incremented)
[1229456867.888762] [032.2] [pid=27002] Creating list of contacts to be notified.
[1229456867.888845] [032.1] [pid=27002] Host notification will NOT be escalated.
[1229456867.888887] [032.1] [pid=27002] Adding normal contacts for host to notification list.
[1229456867.888914] [032.2] [pid=27002] Adding individual contacts for host to notification list.
[1229456867.888933] [032.2] [pid=27002] Adding members of contact groups for host to notification list.
[1229456867.888947] [032.2] [pid=27002] Adding members of contact group 'server-admins' for host to notification list.
[1229456867.888963] [032.2] [pid=27002] Adding contact 'bob' to notification list.
 [1229456867.889005] [032.2] [pid=27002] Adding contact 'bill' to notification list.
 [1229456867.889128] [032.2] [pid=27002] Adding contact 'bobysms' to notification list.
[1229456867.889150] [032.2] [pid=27002] Adding contact 'billbysms' to notification list.
 [1229456867.889234] [032.2] [pid=27002] ** Attempting to notifying contact 'bobbysms'...
[1229456867.889256] [032.2] [pid=27002] ** Checking host notification viability for contact 'bobbysms'...
[1229456867.889399] [032.2] [pid=27002] ** Host notification viability for contact 'bobbysms' PASSED.
[1229456867.889431] [032.2] [pid=27002] ** Notifying contact 'bobbysms'
[1229456867.889474] [032.2] [pid=27002] Raw notification command: /usr/bin/printf "Type: $NOTIFICATIONTYPE$\nHst: $HOSTNAME
$\nS: $HOSTSTATE$\nIP: $HOSTADDRESS$\nSvc: $SERVICEDESC$\nS: $SERVICESTATE$\nI: $HOSTOUTPUT$\nDate/Time: $SHORTDATETIME$\n"
 | /usr/bin/sendsms.pl $CONTACTPAGER$
[1229456867.923656] [032.2] [pid=27002] Processed notification command: /usr/bin/printf "Type: RECOVERY\nHst: server\nS: UP
\nIP: 202.27.240.1\nSvc: $SERVICEDESC$\nS: $SERVICESTATE$\nI: PING OK - Packet loss = 0%, RTA = 0.24 ms\nDate/Time: 12-17-2
008 08:47:47\n" | /usr/bin/sendsms.pl 0123456789
.
.
.
[1229456868.676251] [032.2] [pid=27002] Calculating next valid notification time...
[1229456868.676330] [032.2] [pid=27002] Default interval: 0.000000
[1229456868.676370] [032.2] [pid=27002] Interval used for calculating next valid notification time: 0.000000
[1229456868.676424] [032.0] [pid=27002] 4 contacts were notified.  Next possible notification time: Wed Dec 17 08:47:47 20
08
[1229456868.676447] [032.0] [pid=27002] 4 contacts were notified.


Nothing there about why the sms contacts were added.  One thing that is a bit strange is the last notification date of 1970.  The time on the box is correct:

# date
Wed Dec 17 09:07:59 NZDT 2008

So still no idea why SMS notifications are going out.



________________________________
Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.
The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20081217/825c1946/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list