Different args for different times

Subhendu Ghosh sghosh at sghosh.org
Tue Feb 4 21:58:17 CET 2003


not easy in the current setup.

easiest would be to write a wrapper which checks localtime and calls 
check_load with the approriate args...

-sg

On Tue, 4 Feb 2003, Russell Scibetti wrote:

> I want to have a service defined that runs a different command depending 
> on the timeperiod.  Example:
> 
> define service{
>         use                             GenericService
>         host_name                       backup_host
>         service_description             Load
>         check_command                   check_load!6,6,6!8,8,8
>         check_period                    backup_times
>         }
> 
> define service{
>         use                             GenericService
>         host_name                       backup_host
>         service_description             Load
>         check_command                   check_load!2,2,2!4,4,4
>         check_period                    nonbackup_times
>         }
> 
> However, Nagios yells about there being 2 services with the same name. 
>  I tried renaming the first one to backupLoad, which works except that 
> if the service is critical at the end of the timeperiod, it continues to 
> display a critical after the backup_times timeperiod is over.  Is there 
> anyway around this?  Ideally I would like them to have the same name, so 
> that during one timeperiod, one set of args is used and during the other 
> timeperiod, the different set is used.  Any help would be appreciated.
> 
> Russell Scibetti
> 
> 

-- 




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com




More information about the Users mailing list