check_http (bogus) setup
Gerard Petersen
gerard at facturize.nl
Thu Apr 15 10:50:22 CEST 2010
Hi All,
I've been testing with the check_http service. I always was under the
assumption that the setup below would check www.example.com
define service{
use generic-service
host_name myhost1
service_description http - www.example.com
check_command check_http!www.example.com!/
}
With this service definition (as often installed out of the box):
define command{
command_name check_http
command_line /usr/lib/nagios/plugins/check_http -H '$HOSTADDRESS$'
}
Wrong! It would check for a webserver on myhost1. Since there's nothing
running at myhost1:80 i got a TCP error. Somewhat baffled I've been tailing
the access.log of www.example.com to see when I actually got a hit.
The funny thing is this (with no additional parms) even returns ok, would
you have a webserver listening on myhost1:80
check_command check_http
So, you would be wise to turn the command syntax into this:
command_line /usr/lib/nagios/plugins/check_http -H '$ARG1$' -u '$ARG2$'
Then this will actually test www.example.com:
check_command check_http!www.example.com!/
Is it me or is this check_http setup misleading? (ubuntu 9.10 in this case)
If you do have a webserver running at myhost1 that's the url you check. So
you might see an OK status and think you're testing www.example.com .. but
you would never touch it.
Anybody experienced this?
Regards,
Gerard.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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