Command to replace timeperiod

Andreas Ericsson ae at op5.se
Mon Nov 24 12:41:42 CET 2008


Please don't top-post. It makes it impossible for mail-archive readers
to follow the flow of the conversation.

Markus.Almroth at teliasonera.com wrote:
> The idea was to only use it for notifications only. In a reasonably
> funcional environment notifications should'nt be sent often enough to
> become a performance killer should they?
> 

That depends. With recurring notifications, a lot of checks are made
against timeperiods to determine if a notificaiton should be sent at
all, or when it next should be sent if it shouldn't be sent right now
(etc, etc). If you implement this, your program will have to be able
to communicate answers to the following questions:
1. Is now a good time?
2. Are there any good times at all?
3. When is the next good time?
4. When does the next good period stop?

That might look trivial, until you think about it and realize that
you need to properly handle the case where the answers to 2, 3 and 4
change between two runs of the timeperiod check. You also need to
devise a way for the plugin to communicate dates and timestamps back
to Nagios in a way that makes sense and doesn't break down.

It would be far, far simpler to implement this in the notification
script itself, where the check only happens in case Nagios has
decided that the notification really has to be sent. For that case,
you only have to answer question 1 above, which is the trivial one.


> 
> 
> /M 
> 
> -----Original Message-----
> From: Andreas Ericsson [mailto:ae at op5.se] 
> Sent: den 21 november 2008 16:34
> To: Nagios Developers List
> Subject: Re: [Nagios-devel] Command to replace timeperiod
> 
> 
> Markus.Almroth at teliasonera.com wrote:
>> I've been considering implementing the use of "standard" Nagios 
>> commands to make it possible to incorporate any kind of calendar
> functionality.
>> Hosts and services could have an option 
>> "notification_timeperiod_commands" or something like that.
>>
>> Good or bad idea?
>>
> 
> Bad. It's a performance killer for anything but very small environments,
> as timeperiods are checked every time a check is run, or a notification
> is sent, or a check is rescheduled, or... etc.
> 
> If you need something like this, submit a patch to let NEB-modules
> replace the timeperiod functionality and then let that NEB-module check
> things up in a database/external file/whatever.
> 


-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/




More information about the Developers mailing list