[Nagiosplug-help] check_http problem

Chris Datfung chris.datfung at gmail.com
Thu Aug 18 13:18:58 CEST 2011

I've searched the archives and seen several similar scenarios but none of
the solutions I saw worked for me. I have several identical configurations
(sans the IP address, domain name etc) that use check_http to monitor
several web servers. When I manually check via the CLI, I get a 200 response
for all of them, but when Nagios checks it returns a 200 for some, while
others get either the following error message:
CRITICAL - Socket timeout after 10 seconds

or a 401 or 403 response. As I mentioned, if I copy and paste the check_http
command via the CLI they all return a 200 response. The only difference I
can tell is the check_http checks that don't work have a a different IP
specified to use via the -I flag then what was in the address field of the
host definition. FWIW, I've checked with check_http v1.4.14 and v1.4.15 with
identical results. The following is an example configuration that returns
the socket timeout error when run by Nagios:

define host{
use generic-host
host_name server-prod
alias  Prod Web Server
address  xxx.xxx.xxx.101
hostgroups http-servers,ssh-servers
check_command check_ssh

define service {
use generic-service
host_name server-prod
service_description server-domainname.com
check_command check_http!-I xxx.xxx.xxx.102 -H domainname.com -t 60 -S

Why does this check work via the CLI and fail when Nagios runs it? How can I
add debugging that shows up in the logs for this specific check?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20110818/2e5b0172/attachment.html>

More information about the Help mailing list