check_http with lighttpd, fastcgi and different port


#1

I’m trying to check_http a lighttpd server in fastcgi mode on port 10100 and if I run the command
/usr/lib/nagios/plugins/check_http -H sub.domain.com -p 10100
I get
OK - HTTP/1.0 301 Moved Permanently - 0.007 second response time |time=0.006705s;;;0.000000 size=179B;;;0

and if I run the same command via the configuration file the web interface give me an error like
HTTP WARNING: HTTP/1.0 404 Not Found


#2

Hi,

Could you “check” your check_http command definition ? and make sure that it is correctly defined, with the option ton input a port ?
(I’m saying that because, by default, the check_http command does not implement the option to change the port).

Also, if you get a 30x “error” (ie: redirection), you can use the option: “-f follow” so that check_http will follow the redirection :slight_smile:


#3

I change the orginal command in command.cfg to accept a port option
Running the check_http in command line with the -f follow option gives me an
HTTP WARNING: HTTP/1.0 404 Not Found
with -f ok|warning|critical I get an
CRITICAL - HTTP/1.0 301 Moved Permanently