service precedence question...

Robert Nelson rnelson at windchannel.com
Thu Nov 4 17:30:43 CET 2004


> Suppose I want to monitor the load on all machines in a certain 
> hostgroup, but in some cases, depending on the machine, I 
> want to pass 
> different arguments to the check_load command. What's the best way to 
> set this up? That is, is there any way to define a generic 
> load service 
> for all machines in the hostgroup but overide the arguments 
> depending on 
> the machine. (This question actually goes for all services, 
> not just load)?

Simon,

Use templates and different check_command's. For instance, in my
configuration, I left the "hosts.cfg" file alone. I then added a hosts/
directory, with info in there. As time went on, I created more
templates, and override them on my one-off services. Then, by defining
two check commands for check_load (say check_load10 and check_load20,
which watch for 10% and 20% loads) in the checkcommand.cfg, I can do two
checks.

In my template for services, I might have a "check_load_svcs" template,
which specifies a check_command of check_load10. Then, on the service
definitions for each device, I will use the check_load_svcs template,
and on the one that's different, I'll specify "check_command
check_load20". This should help you create one-off's real easy.

If you need some config examples, I can provide them.

Rob Nelson
Network Engineer
Windchannel Communications
919-538-6326 


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
_______________________________________________
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