Re: [Nagios-devel] Bug in exclude timeperiods code?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Bug in exclude timeperiods code?

Post by Guest »

--0015175cdff85e132b048f595485
Content-Type: text/plain; charset=ISO-8859-1

On Mon, Aug 9, 2010 at 11:26 AM, Ton Voon wrote:
>
> On 5 Aug 2010, at 13:43, nap wrote:
>
>> Hi,
>>
>> I can't code, but I can propose an algorithm that works (optimal I
>> don't know). It just need functions to get the start and end see from
>> a time we want for all daterange types (maybe there are already theses
>> functions).
>>
>> Then it' a recursive algo between valid/invalid (will always go
>> thurser and stop at begining+1 year so it will stop). The "next
>> invalid" function is like valid, for each daterange we search the next
>> invalid, check is this time is globally invalid (can be invalid for a
>> daterange but valid for another one) and take the min. Then check for
>> it's own exclude of course (so next valid for them).
>>
>> I hope someone will code it.
>>
>>
>> Jean
>
> Hi Jean,
>
> Can you clean up your test and add them as a TODO? This will help when
> we get round to coding it, to make sure it hits all the right cases.
>
> As many different examples as possible would be great.
>
> Ton
Hi Ton,

Here is the 2 patchs for a total of 4 test cases with exclude. They
call different type of daterange.


Jean


>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> _______________________________________________
> Nagios-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/lis ... gios-devel
>

--0015175cdff85e132b048f595485
Content-Type: application/octet-stream; name="minimal.cfg.diff"
Content-Disposition: attachment; filename="minimal.cfg.diff"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_gdmyw9gl0

MTM2YTEzNywxOTUKPiAKPiBkZWZpbmUgdGltZXBlcmlvZHsKPiAgICAgICAgIHRpbWVwZXJpb2Rf
bmFtZSBUZXN0X2V4Y2x1ZGUKPiAgICAgICAgIGFsaWFzICAgICAgICAgICBUZXN0IGZvciBleGNs
dWRlI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gICAgICAgfQo+IAo+IGRlZmluZSB0aW1lcGVyaW9kewo+ICAgICAgICAgdGltZXBlcmlvZF9u
YW1lIG15ZXhjbHVkZTMKPiAgICAgICAgIGFsaWFzIG15ZXhjbHVkZTMKPiAJYXByaWwgMSAtIGF1
Z3VzdCAxNiAwMDowMC0yNDowMAo+ICAgICAgICAgfQo+IAo+IGRlZmluZSB0aW1lcGVyaW9kewo+
ICAgICAgICAgdGltZXBlcmlvZF9uYW1lIFRlc3RfZXhjbHVkZTQKPiAgICAgICAgIGFsaWFzICAg
ICAgICAgICBUZXN0IGZvciBleGNsdWRlIHRpbWVwZXJpb2QKPiAgICAgICAgIHR1ZXNkYXkgLTEg
LSBtb25kYXkgMSAgMTY6MzAtMjQ6MDAKPiAgICAgICAgIGV4Y2x1ZGUgICAgICAgICBteWV4Y2x1
ZGU0Cj4gICAgICAgICB9Cj4gCj4gCj4gZGVmaW5lIHRpbWVwZXJpb2R7Cj4gICAgICAgICB0aW1l
cGVyaW9kX25hbWUgbXlleGNsdWRlNAo+ICAgICAgICAgYWxpYXMgbXlleGNsdWRlNAo+ICAgICAg
ICAgYXByaWwgMSAtIGF1Z3VzdCAxNiAwMDowMC0yNDowMAo+ICAgICAgICAgfQo+IAo+IAo+IAo=
--0015175cdff85e132b048f595485
Content-Type: application/octet-stream; name="test_timeperiods.c.diff"
Content-Disposition: attachment; filename="test_timeperiods.c.diff"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_gdmyw9gn1

NDAwYTQwMSw0MDIKPiAKPiAKNDAyYTQwNSw0NTkKPiAJLyogQSBsaXR0bGUgdHJ

...[email truncated]...


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