get_next_valid_time() fails to consider exclusions?

Hendrik BŠäcker andurin at process-zero.de
Thu May 29 21:31:11 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Luke,
hi List,

sorry for Topposting but actual I only want to drop a note about this.

A few weeks ago a few user from a german forum pointed me to this problem.
It is like you say - nagios seems to ignore the time after the exclusion.
My tests were:

Exclude a few minutes from the 24x7 timeperiod and use it as check_period.
Result: Nagios won't check for today - next valid time begins tomorrow
at 00:00.

I think we can acknowledge this behavior and you are right with thinking
against get_next_valid_time().

Actual I have to few time to track this down, but maybe some other users
here on the list have.

Regards,
Hendrik

Luke Ross schrieb:
| It looks like get_next_valid_time() fails to consider time period
| exclusions. This can cause it to calculate the next time incorrectly
| in some cases.
|
| For instance, suppose I define timeperiod1 as:
| define timeperiod {
|          timeperiod_name timeperiod1
|          alias           Time Period 1
|          sunday          00:00-07:00,22:00-24:00
|          monday          00:00-07:00,22:00-24:00
|          tuesday         00:00-07:00,22:00-24:00
|          wednesday       00:00-07:00,22:00-24:00
|          thursday        00:00-07:00,22:00-24:00
|          friday          00:00-07:00,22:00-24:00
|          saturday        00:00-07:00,22:00-24:00
| }
|
| and timeperiod2 as:
| define timeperiod {
|          timeperiod_name timeperiod2
|          alias           Time Period 2
|          sunday          00:00-24:00
|          monday          00:00-24:00
|          tuesday         00:00-24:00
|          wednesday       00:00-24:00
|          thursday        00:00-24:00
|          friday          00:00-24:00
|          saturday        00:00-24:00
|          exclude        timeperiod1
| }
|
| If I set a service to use timeperiod2 for notifications, and the
| service develops a problem during the excluded times, Nagios won't
| send a notification even after the excluded time is over.
|
| Here's an example:
| --The service develops a problem at 06:30 on Monday.
| --Nagios recognizes the problem but decides not to send a
| notification because the time is still during the exclusion period.
| --Nagios sets the service's next notification time to 00:00 on
| Tuesday, instead of to 07:00 on Monday.
| --Nagios rechecks the service after 07:00 on Monday, but it doesn't
| send a notification because "We haven't waited long enough to
| re-notify contacts about this service.", because it thinks the next
| notification time is 00:00 on Tuesday (i.e. still in the future).
|
| Thanks,
| Luke
|
|
|
| -------------------------------------------------------------------------
| This SF.net email is sponsored by: Microsoft
| Defy all challenges. Microsoft(R) Visual Studio 2008.
| http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
| _______________________________________________
| Nagios-devel mailing list
| Nagios-devel at lists.sourceforge.net
| https://lists.sourceforge.net/lists/listinfo/nagios-devel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkg/BH8ACgkQlI0PwfxLQjmH0wCdEi/5lkURkePwi7g0gvb5Q2im
S8sAn3BssmIj4fYUVMKJhqcvETuRlJFU
=atZ/
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3261 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20080529/00e9a245/attachment.bin>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- 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