[Nagios-users] timeperiod definition for election day?

Jochen Bern Jochen.Bern at LINworks.de
Tue Dec 6 17:37:06 CET 2011


On 12/06/2011 05:02 PM, Paul M. Dubuc wrote:
> Jochen Bern wrote:
>> Am I missing something, or would this
>> be equivalent to "the Tuesday between 02-Nov and 08-Nov", which, in turn,
>> should (!) be equivalent to
>>
>> define timeperiod {
>> 	timeperiod_name	Election Day
>> 	alias		Shouldnt you be out there voting for someone
>> 	november 2 - 8	00:00-24:00
>> 	exclude		AllButTuesdays
>> 	}
> 
> Amazing.  Thanks!  But until the problem with the 'exclude' directive is fixed 
> (see the known issue under 3.2.0 - 08/12/2009 at 
> http://www.nagios.org/projects/nagioscore/history/core-3x)

Hence the stress on "should". :-}

> we might want to do it this way:
>   define timeperiod {
>   	timeperiod_name	Election Day
>   	alias		Shouldnt you be out there voting for someone
>   	november 2 - 8	00:00-24:00
>   	use		AllButTuesdays
>   	}
> Do you think this will also work?

The description of how templates work is based on the assumption that
within every definition, there's a set of possible statements that are
perpendicular to / independent of each other and that every one of these
is individually either inherited as-is from the template, expanded
(additive inheritance) from the template, or overwritten outright. This
does not hold for timeperiods, as, e.g., "December 6th" and "first
Tuesday in December" may or may not refer to the same day. I wouldn't
dare predict how the current code, much less the future code after
fixing the abovementioned bug, does/will/should handle such cases.

Having that said, I *would* expect "use AllButTuesdays" to *add* the
time intervals of AllButTuesdays to the timeperiod, rather than
*substracting* them like "exclude AllButTuesdays" should.

Kind regards,
								J. Bern
-- 
Jochen Bern, Systemingenieur --- LINworks GmbH <http://www.LINworks.de/>
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Geschäftsführer Metin Dogan, Oliver Michel

------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/




More information about the Developers mailing list