service checks and timeperiods

Andreas Ericsson ae at op5.se
Wed Jun 8 20:44:15 CEST 2005


Lori Adams wrote:
> Sometimes there is a need to run the same check but with different
> thresholds depending on time of day.
> 
> Currently, I have to create two separate checks with a different name
> for each.  What would be nice would be the ability to do something like
> this:
> 

You can. Just s/timeperiod/check_period/ and you're good to go. 
notification_period is also a viable option.

> define service {
> 
>       use                     generic-service-template
> 
>       host_name               bar
> 
> service_description     check
> 
> check_command           do_check!10!20
> 
> timeperiod              workhours
> 
> contact_groups          foo
> 
> }
> 
> define service {
> 
>       use                     generic-service-template
> 
>       host_name               bar
> 
> service_description     check
> 
> check_command           do_check!100!200
> 
> timeperiod              nonworkhours
> 
> contact_groups          foo
> 
> }
> 
>  
> 
> Then in the web interface, it would only display "check", and then run
> the correct check based on time.
> 
> Currently I have to create checkA and checkB, and both are displayed in
> the UI, even though one won't be checked for the next 10 hours or so. 
> 
> Does anyone know of a way to do this?
> 
>  
> 
> Thanks,
> 
> Lori
> 
>  
> 
>  
> 
> 

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
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