help for a newbie

Subhendu Ghosh sghosh at sghosh.org
Fri May 30 20:03:31 CEST 2003


On Fri, 30 May 2003, Tim Ruckpaul wrote:

> Hallo,
> can anyone tell me the meaning of $ARGn$ in resource.cfg?
> I am an total newbie and nagios documentation is not detailed enough.
> 
> Can anyone tell me a better documentation that the one at www.nagio.org?
> I need to implement nagios for school, i don't want to supervise a huge
> network.
> 

The documentation at nagios.org is actually quite complete...

In host and service definitions - you need to specify a command that will 
be run to verify state.

If you don't explicity provide a path to an executeable in the 
host/service definition, nagios attempts to match it to a command 
definition (usually in command.cfg)

The command definition can be hard-coded with options in which case reuse 
of definition across different services and hosts becomes impossible, or 
the definition can make use of macros.

There are 2 kinds of macros - $USERx$ and $ARGx$

USERx macros are defined once (in resource.cfg) and can be used anywhere

ARGx macros are defined and used by individual host and service 
definitions.

eg.  service definition command:  check_smtp!6!9

The "!" is the demarcation between command name and subsequent arguments
$ARG1$ is 6
$ARG2$ is 9


eg. command definition: check_smtp -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$


now you can monitor multiple email servers each with a customized response 
time using a single command definition.

-- 
-sg



-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
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