I just installed nagios on a server machine, only to be greeted with a critical error on the HTTP service.
the error is
HTTP CRITICAL - Socket timeout after 10 seconds
I searched for this error and got the suggestion to run check_http
with a longer timeout. so I appended -t 20
in file commands.cfg
, next to "check_http" command. restarted nagios but i still get an error (for the new timeout).
Then searched some more. The error seems common, so I start thinking I may have some other problem.
I tried running check_http on my own:
root@srv$ /usr/libexec/nagios/check_http -H localhost -N -p 80 -t 1
HTTP OK: HTTP/1.1 200 OK - 846 bytes in 0.003 second response time |time=0.003080s;;;0.000000 size=846B;;;0
The response seems alright, but I know little about http.
Any clues?
EDIT: the command definition for check_http
, taken from /etc/nagios/objects/commands.cfg is
# 'check_http' command definition
define command{
command_name check_http
command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
}
I am not sure how to check what are the values of the variables $HOSTADDRESS$ and more importantly $ARG1$.
then the definition of the service is
define service{
use local-service ; Name of service template to use
host_name localhost
service_description HTTP
check_command check_http
notifications_enabled 1
}
the distribution is slackware 14.0 64bit.
check_http -H stargaze.skails.home
. the FQDN is just an internal domain name. I hope this is what you were seeking ?:)