avail.cgi Timeperiods

Michael Medin mime at forumsql.se
Wed Sep 15 13:32:47 CEST 2004


Hi,

First off sorry if I have posted an attachment to an attachment-free
list (if so let me know, and I will repost with the attachment as a
link).

I posted to "nagios-users" a while back (2004-06-23) requesting
information on how to get availability reports based on a timeperiod.
Why I would like this is because we have in our SLA 8x5 but I still want
to have monitoring 24x7 for "internal use".
I got a response suggesting either to add a custom script or to add the
functionality myself. Being somewhat familiar with C/C++ I decided to
try to adding the functionality myself after having updated to 2.0. 

I have now created a simple patch which does some of the things I want.
This patch is far from complete (as it only covers single hosts and only
avail.cgi). But I wanted to get feedback before embarking on changing a
lot of things as I'm not very familiar with Nagios development.


What this patch does is:
1, Add a drop-down box to the "Select Report Options" page. 
2, Parses the new variable.
3, If the new variable is detected parses time based on it.
4, on Single Host (ONLY!) rescales the "total_time" to include only the
selected timeperiod.

I would like to know if there is an interest for the functionality, if I
have implemented it in a reasonable way, if I should implement it
"through out" the reports section and similar such questions.


// Michael Medin


-------------- next part --------------
A non-text attachment was scrubbed...
Name: avail_timeperiods.patch
Type: application/octet-stream
Size: 7244 bytes
Desc: avail_timeperiods.patch
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20040915/939c1a1c/attachment.obj>


More information about the Developers mailing list