avail.cgi issue

Jonathan Crocombe CrocombeJ at cardiff.ac.uk
Thu Mar 24 16:00:22 CET 2011


Hello

I'm currently running Nagios 3.2.1, and have been having issues with 
avail.cgi. 

If a report is run for a service which has a period of scheduled downtime 
outside of rpttimeperiod, then there are negative percentages for 
unscheduled critical. To recreate this:

- The report must be run with a time period such as 'workhours'. The issue 
does not occur with 24x7.
- The service must have a scheduled downtime period which lies outside of 
the report time period. 

After a bit of digging this turned out to be due to the total critical 
time being calculated based on the rpttimeperiod, but the calculation of 
the scheduled critical time ignoring this and always being 24x7, i.e.

        total(during rpttimeperiod) - scheduled(at any time) = unscheduled

I've had a go at fixing this in version 3.2.1, and the diff is attached. 
There are undoubtably many things wrong with the way I have done this, but 
thought I'd send it anyway! It also contains a fix for the stray 'TEST' 
when outputting to csv, which I notice has already been fixed in version 
3.2.3. 

I've checked, and this is also a problem with avail.cgi version 3.2.3.

Thanks

Jon





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20110324/dc13b856/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avail.c.3.2.1.rpttimeperiod.diff
Type: application/octet-stream
Size: 5212 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20110324/dc13b856/attachment.obj>
-------------- next part --------------
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list