I am trying to use nagios to monitor https and when I use this command ./check_http somehost -p 443 I get this message
Invalid HTTP response received from host on port 443 but when I use
./check_tcp somehost -p 443
I get this: TCP OK - 0.001 second response time on port 443|time=0.001184s;0.000000;0.000000;0.000000;10.000000
what could be wrong?
check_tcp only checks if there is some sort of answer, so anything which responds is ok.
check_http expects an HTTP response of some sort.
As an example: should you have an NTP server responding on that port check_tcp would give ok, but check_http would fail.
And by the way check_http has an option which i did not find in the usage guide for checking https certificate expiration:
root@submariner(sun58):/export/nagios2/libexec# ./check_http -H www.myhttpshost.it --ssl -C 30
CRITICAL - Certificate expired on 09/26/2005 23:59.
Luca
Hello, I have the same problem when i want to control secured websites.
I use this command :
$USER1$/check_http -H $HOSTADDRESS$ -ssl -u $ARG1$ -p $ARG2$
with arguments : !http://myserver:Port/folder/!port or !/folder/!port it’s the same thing
and I have this error :
Invalid HTTP response received from host on port XXXX
I tested many command like :
$USER1$/check_http -H $HOSTADDRESS$ -S -u “$ARG1$” -p $ARG2$
or
$USER1$/check_http -H $HOSTADDRESS$ --ssl -u “$ARG1$” -p $ARG2$
but i always have the same error, I don’t know what it means.
What could be wrong?
Thanks for your help.