check_http bug?

Richard Quintin rich+nagios at quintinz.com
Thu May 8 14:12:28 CEST 2008


I'm trying to check a virtual host on a non-standard port using
check_http.  I've tried all permutations I can think of and can't seem
to get it to work.  It appears to me to be a bug, but if anyone can
show me where I'm using the wrong parameters that would be great.
Otherwise I'll be working on a patch for this today....

# Here I try just a simple virtual host with the port included in the hostname
# Notice the doubling up of the port
:~$ check_http --onredirect=follow -w 9 -c 10 -H devl.cms.vt.edu:29943
-u /Rhythmyx/ -R "Rhythmyx Login" -L
<A HREF="http://devl.cms.vt.edu:29943:29943/Rhythmyx/"
target="_blank">Name or service not known
HTTP CRITICAL - Unable to open TCP socket

# Here I pull the port out and specify it with -p
# But because the port isn't included in the header the check fails
~$ check_http --onredirect=follow -w 9 -c 10 -H devl.cms.vt.edu -p
29943 -u /Rhythmyx/ -R "Rhythmyx Login" -L
<A HREF="http://devl.cms.vt.edu:29943/Rhythmyx/" target="_blank">HTTP
CRITICAL - Invalid HTTP response received from host on port 29943

# Here I specify the port in the hostname and use the -p argument
# We're back to the doubling up problem
:~$ check_http --onredirect=follow -w 9 -c 10 -H devl.cms.vt.edu:29943
-p 29943 -u /Rhythmyx/ -R "Rhythmyx Login" -L
<A HREF="http://devl.cms.vt.edu:29943:29943/Rhythmyx/"
target="_blank">Name or service not known
HTTP CRITICAL - Unable to open TCP socket


-- 
Richard Quintin, DBA
Database & Application Administration
Virginia Tech

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone




More information about the Developers mailing list