Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We're using Nagios to monitor our site (and a bunch of other stuff.) For some odd reason, when I test out the command

/usr/lib/nagios/plugins/check_http -H 'domainname.com'

the response that comes back is HTTP/1.1 200 OK but when I set up the service to do it:

# Check that domain is running
define service {
    hostgroup_name                  hostgroup
    service_description             host site
    check_command                   check_httpname!domainname.com
    use                             generic-service
    notification_interval           1; set > 0 if you want to be renotified

the response that comes back is HTTP/1.1 503 Service Unavailable.

Does anyone know why this would be happening?

share|improve this question
Can you post the command definition of check_httpname? –  EEAA Jun 11 '10 at 19:35

1 Answer 1

up vote 1 down vote accepted

Not sure why I can't add a comment but can you might want to verify your address and host_name in the host definition. I've been stuck in situations where the command line check script works but the GUI is telling me something else. Usually it's a typo in the address field.

share|improve this answer
Might be a typo in the check_httpname command definition in command.cfg too, per ErikA's question above. –  gareth_bowles Jun 11 '10 at 23:54
It was in fact the host_name and address. I was trying to get localhost to use a different hostname. Just went through and added a new host and therefore a new host_name. Thanks! –  Michael T. Smith Jun 14 '10 at 18:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.