Command Definitions
Tong Young
Tong at keen.com
Thu Jan 23 22:44:53 CET 2003
You can put spaces in.
Check_snmp -H $HOSTADDRESS$ -C blah -o $ARG1$ $ARG2$ $ARG3$
I have that in my config file so I can specify warning and critical on
the ones that need it and regex on the ones that need that.
So my service has the following:
Check_snmp!1.1.1.1.1!-w 500!-c 1000
-----Original Message-----
From: Jon Lyons [mailto:jlyons30 at yahoo.com]
Sent: Thursday, January 23, 2003 12:01 PM
To: dan at remics.net; nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Command Definitions
Why not;
/usr/local/nagios/libexec/check_http -H $ARG1$ -u $ARG2$
&
check_http!www.mydomain.com!testscript.pl
dan at remics.net wrote:
I don't know if this is already in the archives (Sourceforge's search
engine is currently misbehaving), but I need a little help with host &
service command definitions.
I was wondering, can command argument macros contain spaces? for
instance if I have the following:
define command{
command_name check_http
command_line
/usr/local/nagios/libexec/check_http $ARG1$
}
Can I then construct a service definition like this:
define service{
host_name host1
service_description Check Virt Server
check_command check_http!-H www.mydomain.com -u
/testscript.pl
...
I know there doesn't seem like a good reason to do this (and that I
should just use multiple macro arguments), but I have my reasons.
Thanks.
Daniel Koffler
dan at remics.net
http://www.remics.net
Tel: 514.497.1411
Fax: 206.600.4642
GPG Key ID: 0xA2C6DC83 Fingerprint: 1FD7 3FDF 8A0D 961F 26A2 3EDA AE8F
A874 A2C6 DC83
_____
Do you Yahoo!?
Yahoo! <http://rd.yahoo.com/mail/mailsig/*http:/mailplus.yahoo.com>
Mail Plus - Powerful. Affordable. Sign up now
<http://rd.yahoo.com/mail/mailsig/*http:/mailplus.yahoo.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030123/9a44120d/attachment.html>
More information about the Users
mailing list