check only workhours?

Marc Powell marc at ena.com
Wed Jun 23 16:39:33 CEST 2004


Michael Medin <mailto:mime at forumsql.se> wrote:
> Hi,
> 
> I want to get reports of system availability during "office hours"
> and I would also like to check "24/7". 
> The first question is hoe can I get availability for non-24/7 checks?
> 
> When I set the service to use a check_period of less then 24 hours I
> still seem to get reports based on a 24 hour day? 
> 
> Service check during roughly 20-or-so hours:
> 
> Result from the "normal 24/7" check:
> Time: 0d 20h 2m 19s
> %Total Time: 83.494%
> %Known time: 100.000%
> 
> Result from the "workhours" check:
> Time: 0d 19h 59m 7s
> %Total Time: 83.272%
> %Known time: 100.000%
> 
> 
> As you can see from above both service have been "up ~20 hours" but
> one of them have only been checking the service for some 4-5 hours. 
> 
> 
> The second issue is can I set the service to check 24/7 but only
> generate reports during office hours? 
> The reasoning here is that I don't want to check something twice to
> get two different report-time-frames. 
> 
> Hope I'm not to confusing, but I'm a pretty new user of nagios and
> don't understand things as well as I should. 

If I'm reading your questions correctly, the answer is going to be the
same for both. You'll need to create your own reporting script. Nagios
only generates reports based on a 24 hour period, regardless of the
check_period for a host or service and I'm sure that you've already
discovered that you can't specify a time window smaller than 24 hours
when generating the reports. There is no way to modify this behavior
without modifying the code. The information is available in nagios.log
and archives/* and just needs to be parsed in the way that's specific to
your needs. If you do end up modifying Nagios to do either I'm sure the
developers would be interested in seeing it (presuming it was written
for 2.0 of course).

--
Marc


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list