Different args for different times

Carroll, Jim P [Contractor] jcarro10 at sprintspectrum.com
Tue Feb 4 23:36:13 CET 2003


Why not use NRPE/nrpe.cfg?

It looks to me like you could be using NRPE.  You would then call check_load
on the remote host (backup_host) using check_nrpe.

On the remote host (backup_host) you would have 2 versions of nrpe.cfg.  One
version would define check_load with args 6,6,6 8,8,8, the other with args
2,2,2 4,4,4.  A cronjob would copy nrpe.cfg.low overtop nrpe.cfg at one time
of day, and another cronjob would copy nrpe.cfg.high overtop nrpe.cfg.  If
you're running the nrpe daemon from (x)inetd, you're done, otherwise you'll
also need to restart the standalone daemon.

Food for thought.

jc

> -----Original Message-----
> From: Subhendu Ghosh [mailto:sghosh at sghosh.org]
> Sent: Tuesday, February 04, 2003 2:58 PM
> To: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] Different args for different times
> 
> 
> 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
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> 


-------------------------------------------------------
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