RE: [Nagios-users] check_http -a Question

2006-03-09 Thread Marc Powell


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:nagios-users-
> [EMAIL PROTECTED] On Behalf Of Jonathan Gourd
> Sent: Thursday, March 09, 2006 3:59 PM
> To: nagios-users@lists.sourceforge.net
> Subject: [Nagios-users] check_http -a Question
> 
> I am defining a service and I am getting stuck. When I define the
check
> command as 'check_http -a foo:bar' I get the following output when
> starting:
> 
> 
> -BEGIN QUITE---
> Checking services...
> Error: Service check command 'check_http -a foo:bar' specified in
service
> 'HTTP' for host 'syndb-b' not defined anywhere!
> -END QUOTE
> 

The check_command for a host or service definition is a reference to a
command{} definitions command_name, not the direct command line that is
run. You either need to hard-code your '-a foo:bar' to the actual
command{} definition itself like 

define command{
command_namecheck_http
command_line$USER1$/check_http $HOSTADDRESS$ -t 45 -a
foo:bar
}

Or pass it as an argument from your service{} definition to a properly
configured command{} definition like

define command{
command_namecheck_http
command_line$USER1$/check_http $HOSTADDRESS$ -t 45 -a $ARG1$
}

define service{
use generic-service
host_name   somehost
service_description MY_HTTP_CHECK
retry_check_interval3
contact_groups  whoever
check_command   check_http!foo:bar
}

In the above example, 'foo:bar' becomes $ARG1$ and is substituted into
the command_line for the command_name check_http.

--
Marc 



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Nagios-users mailing list
Nagios-users@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


[Nagios-users] check_http -a Question

2006-03-09 Thread Jonathan Gourd
I am defining a service and I am getting stuck. When I define the check command as 'check_http -a foo:bar' I get the following output when starting:-BEGIN QUITE---Checking services...
Error: Service check command 'check_http -a foo:bar'
specified in service 'HTTP' for host 'syndb-b' not defined anywhere!-END QUOTEWhere am I supposed to define this?Thanks,Jonathan Gourd
PACS SAThe Lahey Clinic