Page 1 of 1

Re: [Nagios-devel] get_next_valid_time() fails to consider

Posted: Thu May 29, 2008 11:31 am
by Guest
This is a cryptographically signed message in MIME format.

--------------ms000906090305050502030409
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

-----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
| [email protected]
| https://lists.sourceforge.net/lists/lis ... gios-devel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkg/BH8ACgkQlI0PwfxLQjmH0wCdEi/5lkURkePwi7g0gvb5Q2im
S8sAn3BssmIj4fYUVMKJhqcvETuRlJFU
=atZ/
-----END PGP SIGNATURE-----

--------------ms000906090305050502030409
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJGzCC
AugwggJRoAMCAQICECC+1z3sjSdLLgsaA6hNhbwwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UE
BhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMT
I1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA4MDUwNTEzMDEzOFoX
DTA5MDUwNTEzMDEzOFowSTEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEmMCQG
CSqGSIb3DQEJARYXYW5kdXJpbkBwcm9jZXNzLXplcm8uZGUwggEiMA0GCSqGSIb3DQEBAQU

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]