Discussion:
[Nagios-users] check_http
Melanie Pfefer
2007-09-07 09:17:07 UTC
Permalink
hi,

I ran this from the shell:

./check_http -H host2 -p 8088
HTTP OK HTTP/1.1 200 OK - 1192 bytes in 0.343 seconds
|time=0.342683s;;;0.000000 size=1192B;;;0


now I added these lines in services.cfg:

define service{
use local-service
; Name of service template to use
host_name host2
service_description HTTP
availability
check_command check_http -H
host2 -p 8080
}

when I ran ./nagios -v ../etc/nagios.cfg, I have this
error:


Error: Service check command 'check_http -H host2 -p
8080' specified in service 'HTTP availability' for
host 'host2' not defined anywhere!


PS: in commands.cfg, I have these:

# 'check_http' command definition
define command{
command_name check_http
command_line $USER1$/check_http -H
$HOSTADDRESS$
}


thanks.



___________________________________________________________
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good http://uk.promotions.yahoo.com/forgood/environment.html
Dennis Huenseler
2007-09-07 09:20:21 UTC
Permalink
Hi there,

you can't define a check_command like >> check_http -H some -p foo << in the service deifinition.

Define a new check in the commands.cfg like

define command{
command_name check_http_args
command_line $USER1$/check_http -H $ARG1$ -p $ARG2$
}

And in the service definition then try

define service{
use local-service
; Name of service template to use
host_name host2
service_description HTTP
availability
check_command check_http_args!host2!8080
}

Kind regards,

Dennis Hünseler

-----Original Message-----
From: nagios-users-***@lists.sourceforge.net [mailto:nagios-users-***@lists.sourceforge.net] On Behalf Of Melanie Pfefer
Sent: Friday, September 07, 2007 11:17 AM
To: nagios-***@lists.sourceforge.net
Subject: [Nagios-users] check_http

hi,

I ran this from the shell:

./check_http -H host2 -p 8088
HTTP OK HTTP/1.1 200 OK - 1192 bytes in 0.343 seconds
|time=0.342683s;;;0.000000 size=1192B;;;0


now I added these lines in services.cfg:

define service{
use local-service
; Name of service template to use
host_name host2
service_description HTTP
availability
check_command check_http -H
host2 -p 8080
}

when I ran ./nagios -v ../etc/nagios.cfg, I have this
error:


Error: Service check command 'check_http -H host2 -p
8080' specified in service 'HTTP availability' for
host 'host2' not defined anywhere!


PS: in commands.cfg, I have these:

# 'check_http' command definition
define command{
command_name check_http
command_line $USER1$/check_http -H
$HOSTADDRESS$
}


thanks.



___________________________________________________________
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good http://uk.promotions.yahoo.com/forgood/environment.html

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-***@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
Melanie Pfefer
2007-09-07 10:07:43 UTC
Permalink
hi,

the configuration went ok as you've said. But now I
get a connection refused error.

Basically I want to monitor whether the apache server
on the remote machine is up or not.
thanx
Post by Dennis Huenseler
Hi there,
you can't define a check_command like >> check_http
-H some -p foo << in the service deifinition.
Define a new check in the commands.cfg like
define command{
command_name check_http_args
command_line $USER1$/check_http -H $ARG1$
-p $ARG2$
}
And in the service definition then try
define service{
use
local-service
; Name of service template to use
host_name host2
service_description HTTP
availability
check_command
check_http_args!host2!8080
}
Kind regards,
Dennis Hünseler
-----Original Message-----
On Behalf Of Melanie Pfefer
Sent: Friday, September 07, 2007 11:17 AM
Subject: [Nagios-users] check_http
hi,
./check_http -H host2 -p 8088
HTTP OK HTTP/1.1 200 OK - 1192 bytes in 0.343
seconds
|time=0.342683s;;;0.000000 size=1192B;;;0
define service{
use
local-service
; Name of service template to use
host_name host2
service_description HTTP
availability
check_command check_http
-H
host2 -p 8080
}
when I ran ./nagios -v ../etc/nagios.cfg, I have
this
Error: Service check command 'check_http -H host2 -p
8080' specified in service 'HTTP availability' for
host 'host2' not defined anywhere!
# 'check_http' command definition
define command{
command_name check_http
command_line $USER1$/check_http -H
$HOSTADDRESS$
}
thanks.
___________________________________________________________
Post by Dennis Huenseler
Want ideas for reducing your carbon footprint? Visit
Yahoo! For Good
http://uk.promotions.yahoo.com/forgood/environment.html
-------------------------------------------------------------------------
Post by Dennis Huenseler
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?
Stop.
Now Search log events and configuration files using
AJAX and a browser.
Download your FREE copy of Splunk now >>
http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
Post by Dennis Huenseler
::: Please include Nagios version, plugin version
(-v) and OS when reporting any issue.
::: Messages without supporting info will risk being
sent to /dev/null
___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/
t***@bt.com
2007-09-07 10:14:41 UTC
Permalink
Hi Melanie,

On your Nagios host can you telnet to port 8080 from the shell? This will ensure you are actually connecting to the box.

I can see further down that you ran check_http and got a result.

Are you running the plugin as the nagios user?

Regards

Tom

-----Original Message-----
From: nagios-users-***@lists.sourceforge.net [mailto:nagios-users-***@lists.sourceforge.net] On Behalf Of Melanie Pfefer
Sent: 07 September 2007 11:08
To: Dennis Huenseler
Cc: nagios-***@lists.sourceforge.net
Subject: Re: [Nagios-users] check_http

hi,

the configuration went ok as you've said. But now I get a connection refused error.

Basically I want to monitor whether the apache server on the remote machine is up or not.
thanx
Post by Dennis Huenseler
Hi there,
you can't define a check_command like >> check_http -H some -p foo <<
in the service deifinition.
Define a new check in the commands.cfg like
define command{
command_name check_http_args
command_line $USER1$/check_http -H $ARG1$
-p $ARG2$
}
And in the service definition then try
define service{
use
local-service
; Name of service template to use
host_name host2
service_description HTTP
availability
check_command
check_http_args!host2!8080
}
Kind regards,
Dennis Hünseler
-----Original Message-----
On Behalf Of Melanie Pfefer
Sent: Friday, September 07, 2007 11:17 AM
Subject: [Nagios-users] check_http
hi,
./check_http -H host2 -p 8088
HTTP OK HTTP/1.1 200 OK - 1192 bytes in 0.343 seconds
|time=0.342683s;;;0.000000 size=1192B;;;0
define service{
use
local-service
; Name of service template to use
host_name host2
service_description HTTP
availability
check_command check_http
-H
host2 -p 8080
}
when I ran ./nagios -v ../etc/nagios.cfg, I have this
Error: Service check command 'check_http -H host2 -p 8080' specified
in service 'HTTP availability' for host 'host2' not defined anywhere!
# 'check_http' command definition
define command{
command_name check_http
command_line $USER1$/check_http -H
$HOSTADDRESS$
}
thanks.
___________________________________________________________
Post by Dennis Huenseler
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good
http://uk.promotions.yahoo.com/forgood/environment.html
-------------------------------------------------------------------------
Post by Dennis Huenseler
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?
Stop.
Now Search log events and configuration files using AJAX and a
browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
Post by Dennis Huenseler
::: Please include Nagios version, plugin version
(-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now.
http://uk.answers.yahoo.com/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________
Nagios-users mailing list
Nagios-***@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
Melanie Pfefer
2007-09-07 12:42:14 UTC
Permalink
I was entering the wrong port number :S

thanks bunches.
Post by t***@bt.com
Hi Melanie,
On your Nagios host can you telnet to port 8080 from
the shell? This will ensure you are actually
connecting to the box.
I can see further down that you ran check_http and
got a result.
Are you running the plugin as the nagios user?
Regards
Tom
-----Original Message-----
On Behalf Of Melanie Pfefer
Sent: 07 September 2007 11:08
To: Dennis Huenseler
Subject: Re: [Nagios-users] check_http
hi,
the configuration went ok as you've said. But now I
get a connection refused error.
Basically I want to monitor whether the apache
server on the remote machine is up or not.
thanx
Post by Dennis Huenseler
Hi there,
you can't define a check_command like >>
check_http -H some -p foo <<
Post by Dennis Huenseler
in the service deifinition.
Define a new check in the commands.cfg like
define command{
command_name check_http_args
command_line $USER1$/check_http -H
$ARG1$
Post by Dennis Huenseler
-p $ARG2$
}
And in the service definition then try
define service{
use
local-service
; Name of service template to use
host_name host2
service_description HTTP
availability
check_command
check_http_args!host2!8080
}
Kind regards,
Dennis Hünseler
-----Original Message-----
On Behalf Of Melanie Pfefer
Sent: Friday, September 07, 2007 11:17 AM
Subject: [Nagios-users] check_http
hi,
./check_http -H host2 -p 8088
HTTP OK HTTP/1.1 200 OK - 1192 bytes in 0.343
seconds
Post by Dennis Huenseler
|time=0.342683s;;;0.000000 size=1192B;;;0
define service{
use
local-service
; Name of service template to use
host_name host2
service_description HTTP
availability
check_command check_http
-H
host2 -p 8080
}
when I ran ./nagios -v ../etc/nagios.cfg, I have
this
Post by Dennis Huenseler
Error: Service check command 'check_http -H host2
-p 8080' specified
Post by Dennis Huenseler
in service 'HTTP availability' for host 'host2'
not defined anywhere!
Post by Dennis Huenseler
# 'check_http' command definition
define command{
command_name check_http
command_line $USER1$/check_http -H
$HOSTADDRESS$
}
thanks.
___________________________________________________________
Post by t***@bt.com
Post by Dennis Huenseler
Want ideas for reducing your carbon footprint?
Visit Yahoo! For Good
http://uk.promotions.yahoo.com/forgood/environment.html
-------------------------------------------------------------------------
Post by t***@bt.com
Post by Dennis Huenseler
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?
Stop.
Now Search log events and configuration files
using AJAX and a
Post by Dennis Huenseler
browser.
Download your FREE copy of Splunk now >>
http://get.splunk.com/
Post by Dennis Huenseler
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
Post by t***@bt.com
Post by Dennis Huenseler
::: Please include Nagios version, plugin version
(-v) and OS when reporting any issue.
::: Messages without supporting info will risk
being sent to /dev/null
___________________________________________________________
Post by t***@bt.com
Yahoo! Answers - Got a question? Someone out there
knows the answer. Try it now.
http://uk.answers.yahoo.com/
-------------------------------------------------------------------------
Post by t***@bt.com
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?
Stop.
Now Search log events and configuration files using
AJAX and a browser.
Download your FREE copy of Splunk now >>
http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
Post by t***@bt.com
::: Please include Nagios version, plugin version
(-v) and OS when reporting any issue.
::: Messages without supporting info will risk being
sent to /dev/null
___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/
t***@bt.com
2007-09-07 13:24:26 UTC
Permalink
Dont ya just hate it when that happens

________________________________

From: Melanie Pfefer [mailto:***@yahoo.co.uk]
Sent: Fri 07/09/2007 13:42
To: Welsh,T,Tom,XSL4A C; ***@twt.de
Cc: nagios-***@lists.sourceforge.net
Subject: RE: [Nagios-users] check_http



I was entering the wrong port number :S

thanks bunches.
Post by t***@bt.com
Hi Melanie,
On your Nagios host can you telnet to port 8080 from
the shell? This will ensure you are actually
connecting to the box.
I can see further down that you ran check_http and
got a result.
Are you running the plugin as the nagios user?
Regards
Tom
-----Original Message-----
On Behalf Of Melanie Pfefer
Sent: 07 September 2007 11:08
To: Dennis Huenseler
Subject: Re: [Nagios-users] check_http
hi,
the configuration went ok as you've said. But now I
get a connection refused error.
Basically I want to monitor whether the apache
server on the remote machine is up or not.
thanx
Post by Dennis Huenseler
Hi there,
you can't define a check_command like >>
check_http -H some -p foo <<
Post by Dennis Huenseler
in the service deifinition.
Define a new check in the commands.cfg like
define command{
command_name check_http_args
command_line $USER1$/check_http -H
$ARG1$
Post by Dennis Huenseler
-p $ARG2$
}
And in the service definition then try
define service{
use
local-service
; Name of service template to use
host_name host2
service_description HTTP
availability
check_command
check_http_args!host2!8080
}
Kind regards,
Dennis Hünseler
-----Original Message-----
On Behalf Of Melanie Pfefer
Sent: Friday, September 07, 2007 11:17 AM
Subject: [Nagios-users] check_http
hi,
./check_http -H host2 -p 8088
HTTP OK HTTP/1.1 200 OK - 1192 bytes in 0.343
seconds
Post by Dennis Huenseler
|time=0.342683s;;;0.000000 size=1192B;;;0
define service{
use
local-service
; Name of service template to use
host_name host2
service_description HTTP
availability
check_command check_http
-H
host2 -p 8080
}
when I ran ./nagios -v ../etc/nagios.cfg, I have
this
Post by Dennis Huenseler
Error: Service check command 'check_http -H host2
-p 8080' specified
Post by Dennis Huenseler
in service 'HTTP availability' for host 'host2'
not defined anywhere!
Post by Dennis Huenseler
# 'check_http' command definition
define command{
command_name check_http
command_line $USER1$/check_http -H
$HOSTADDRESS$
}
thanks.
___________________________________________________________
Post by t***@bt.com
Post by Dennis Huenseler
Want ideas for reducing your carbon footprint?
Visit Yahoo! For Good
http://uk.promotions.yahoo.com/forgood/environment.html
-------------------------------------------------------------------------
Post by t***@bt.com
Post by Dennis Huenseler
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?
Stop.
Now Search log events and configuration files
using AJAX and a
Post by Dennis Huenseler
browser.
Download your FREE copy of Splunk now >>
http://get.splunk.com/
Post by Dennis Huenseler
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
Post by t***@bt.com
Post by Dennis Huenseler
::: Please include Nagios version, plugin version
(-v) and OS when reporting any issue.
::: Messages without supporting info will risk
being sent to /dev/null
___________________________________________________________
Post by t***@bt.com
Yahoo! Answers - Got a question? Someone out there
knows the answer. Try it now.
http://uk.answers.yahoo.com/
-------------------------------------------------------------------------
Post by t***@bt.com
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?
Stop.
Now Search log events and configuration files using
AJAX and a browser.
Download your FREE copy of Splunk now >>
http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
Post by t***@bt.com
::: Please include Nagios version, plugin version
(-v) and OS when reporting any issue.
::: Messages without supporting info will risk being
sent to /dev/null
___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/

Continue reading on narkive:
Loading...