Creating own check commands

Ira Harkness ira at mse.ufl.edu
Wed Jul 2 15:20:04 CEST 2003


I am using the check_nwstat program to check for free space on volumes on
the netware server. Each server has different volume names except for one in
common, "sys."

I created the following to check freespace on sys
# 'check_freespace sys' command definition
define command{
        command_name    check_freesys
        command_line    $USER1$/check_nwstat -H $HOSTADDRESS$ -v VKFsys ZERO
}

Works fine and I can use a few define services to get to all the netware
servers to check "sys."

Now I want to check other volumes but I don't want to have to create a
seperate command for each volume. I noticed in some of the other check
commands there is a variable called $ARG1$

Where do I reference this variable. Obviously $HOSTADDRESS$ gets the value
of "host_name" when I set that up in services.cfg. How do I give $ARG1$ a
value when I set up something in services.cfg


Is the following how I would do it? I need to know what else to put in
services.cfg to make it where $ARG1$ can be the volume I want to check. Also
is the format for checkcommands correct?

#services.cfg line#
host_name   box.address.com

#checkcommands.cfg#
$USER1$/check_nwstat -H $HOSTADDRESS$ -v VKF$ARG1$ ZERO

Thank you so much for your help. If you need clarification please feel free
to message me on AIM - xCrytikalx




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/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