Differentiating commands.cfg and services.cfg

Matt Juszczak matt at atopia.net
Mon Mar 3 18:42:43 CET 2008


Hi all,

I'm having a bit of trouble figuring out the best way to split up what detail 
goes in commands.cfg and what goes in services.cfg.

In other words, right now I have 3 checks:

# 'check_disk' command definition
define command{
         command_name    check_disk
         command_line    $USER1$/check_by_ssh -t30 -H $HOSTNAME$ ... 
"$USER1$/check_disk ..."
         }


# 'check_load' command definition
define command{
         command_name    check_load
         command_line    $USER1$/check_by_ssh -t30 -H $HOSTNAME$ ... 
"$USER1$/check_load ..."
         }


# 'check_proc_cnt' command definition
define command{
         command_name    check_proc_cnt
         command_line    $USER1$/check_by_ssh -t30 -H $HOSTNAME$ ... 
"$USER1$/check_procs ..."
         }


Then, from services.cfg, I just call check_load, check_disk, etc. and it just 
works.

But I'm wondering if I'm repeating too much data.  For instance, in each of 
these definitions, the command_line is mostly the same, except mainly the 
actualy remote binary being called.

Is it better to keep these separate?  Or should I create a single, check_by_ssh 
command, which I can pass the specific remote script to execute, etc, thereby 
adding a bit more to the services.cfg file but reducing the commands.cfg file.

Which method is better?

Thanks!

-Matt

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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