Alternate schedule for service

patrick.morris at hp.com patrick.morris at hp.com
Mon Feb 22 21:34:33 CET 2010


Hi shadih!

On Mon, 22 Feb 2010, shadih rahman wrote:

> I have to check a service every 30 minutes during normal business hour and check the service every two hours after mid-night.  I have a extended time period  definition.  Can someone please give an example how to do this?  Thanks
> 
> define timeperiod{
>         timeperiod_name extended
>         alias           extended
>         sunday          07:00-22:59,23:00-06:59
>         monday          07:00-22:59,23:00-06:59
>         tuesday         07:00-22:59,23:00-06:59
>         wednesday       07:00-22:59,23:00-06:59
>         thursday        07:00-22:59,23:00-06:59
>         friday          07:00-22:59,23:00-06:59
>         saturday        07:00-22:59,23:00-06:59
>         }
> 
> define service{
>         name                    extended                ; Name of this template
>         use                     generic-service     ; Inherit default values
>         check_period            extended
>         normal_check_interval   30
>         retry_check_interval    5
>         max_check_attempts      2
>         notification_period     extended
>         notification_interval   30
>         notification_options    c,r,f
>         register                0        ; DONT REGISTER THIS - ITS A TEMPLATE
> }

If you need two different normal_check_intervals, you probably need two
services.  I can't think of any way to modify the check interval based
on a time period (though maybe someone else will have some ideas).

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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