<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6617.6">
<TITLE>Re: [Nagios-devel] Check becomes unplanned</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Is it a window host? If so, that might be the nsclient++ shouldn't start well.<BR>
<BR>
<BR>
----- Original Message -----<BR>
From: nagios-devel-bounces@lists.sourceforge.net <nagios-devel-bounces@lists.sourceforge.net><BR>
To: Nagios Developers List <nagios-devel@lists.sourceforge.net><BR>
Sent: Wed Sep 10 02:08:35 2008<BR>
Subject: [Nagios-devel] Check becomes unplanned<BR>
<BR>
Hi everyone,<BR>
<BR>
I don't know whether this is a bug or not. And maybe you'll never be affected by this. I believe this only happens when you are using time periods for service (or host) checks and an external program corrects the time backwards. The service check will no longer be executed. This happened in our environment three times already. The bad thing: you never realize that there is an unplanned service. The service state resides at the last check result.<BR>
<BR>
We're having service checks only occurring nightly. During the day, the time was corrected by ntp. Nagios realized the time change (see message below). The next check time is corrected for these services, but in the evening, when the check should occur, the service becomes unplanned. The service check stays unplanned until the nagios configuration is reloaded or the service is re-scheduled manually.<BR>
<BR>
Did anyone experience this behavior already? Please let me know if you need further information.<BR>
<BR>
Regards<BR>
Bernd<BR>
<BR>
<BR>
These are the steps how you can re-create it:<BR>
<BR>
Edit localhost.cfg and add a service entry:<BR>
define service{<BR>
  use                             local-service<BR>
  host_name                       localhost<BR>
  service_description             Testping<BR>
  check_command                   check_ping!100.0,20%!500.0,60%<BR>
}<BR>
<BR>
Reload the nagios configuration (/etc/init.d/nagios reload).<BR>
<BR>
Re-schedule the next check of this service, so we get the result immediately.<BR>
<BR>
I've got these values:<BR>
Last Check Time:        09-09-2008 19:29:54<BR>
Next Scheduled Check:   09-09-2008 19:34:54<BR>
<BR>
Add a timeperiod. The important line is the line with the current weekday (tuesday). Set the start of the next period to a time in the future (I've added about eight minutes, so I've got 19:40):<BR>
<BR>
define timeperiod {<BR>
  timeperiod_name test_timeperiod<BR>
  alias           Test Timeperiod<BR>
  sunday          00:00-06:00,18:00-24:00<BR>
  monday          00:00-06:00,18:00-24:00<BR>
  tuesday         00:00-06:00,19:40-24:00<BR>
  wednesday       00:00-06:00,21:00-24:00<BR>
  thursday        00:00-06:00,22:00-24:00<BR>
  friday          00:00-06:00,18:00-24:00<BR>
  saturday        00:00-06:00,18:00-24:00<BR>
}<BR>
<BR>
Modify the service "Testping" and add<BR>
  check_period                    test_timeperiod<BR>
<BR>
Reload the nagios configuration (/etc/init.d/nagios reload).<BR>
<BR>
The webinterface tells me the same next check time:<BR>
Next Scheduled Check:   09-09-2008 19:34:54<BR>
<BR>
Passing 19:34:54, the next check time is updated to the time I've set in the time period:<BR>
Next Scheduled Check:   09-09-2008 19:40:00<BR>
<BR>
Now I "correct" the current time (this could also happen when ntdp is running):<BR>
root@u02:~# date<BR>
Di 9. Sep 19:37:31 CEST 2008<BR>
root@u02:~# date -s 19:36<BR>
Di 9. Sep 19:36:00 CEST 2008<BR>
<BR>
The Nagios event log tells me:<BR>
[09-09-2008 19:36:04] Warning: A system time change of 0d 0h 1m 37s (backwards in time) has been detected. Compensating...<BR>
<BR>
The next check time is then:<BR>
Next Scheduled Check:   09-09-2008 19:38:23<BR>
<BR>
Passing 19:38:23, the check is set to unplanned:<BR>
Next Scheduled Check:   N/A<BR>
<BR>
--<BR>
Psssst! Schon das coole Video vom GMX MultiMessenger gesehen?<BR>
Der Eine für Alle: <A HREF="http://www.gmx.net/de/go/messenger03">http://www.gmx.net/de/go/messenger03</A><BR>
<BR>
-------------------------------------------------------------------------<BR>
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge<BR>
Build the coolest Linux based applications with Moblin SDK & win great prizes<BR>
Grand prize is a trip for two to an Open Source event anywhere in the world<BR>
<A HREF="http://moblin-contest.org/redirect.php?banner_id=100&url=/">http://moblin-contest.org/redirect.php?banner_id=100&url=/</A><BR>
_______________________________________________<BR>
Nagios-devel mailing list<BR>
Nagios-devel@lists.sourceforge.net<BR>
<A HREF="https://lists.sourceforge.net/lists/listinfo/nagios-devel">https://lists.sourceforge.net/lists/listinfo/nagios-devel</A><BR>
</FONT>
</P>

</BODY>
</HTML>