Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I execute

sudo -u nagios /usr/lib64/nagios/plugins/ hostname "check_haproxy -u \"http://localhost:10000/haproxy?stats\;csv\""

it runs perfectly on the server.

For this, I have this in my HAProxy.cfg

define service {
        use     generic-service
        hostgroup_name  pwmail-ee-oxweb
        service_description     HAProxy-ee
        servicegroups   ssh-dep
        check_command   check_by_ssh!check_haproxy -u \"http://localhost:10000/haproxy?stats\;csv\"
        contacts        sysad,mail-hosting-rt

It doesn't work. Says that Return code of 127 is out of bounds - plugin may be missing.

What am I doing wrong?

share|improve this question
what does look like? Could you please show us the result of check_haproxy -u \"http://localhost:10000/haproxy?stats\;csv\"? – quanta Oct 15 '12 at 16:40
There's a standard check_by_ssh plugin. What is A shell script that wraps the standard command, or something else? Nagios wiki refers to… as an example for using the standard command. – cjc Oct 15 '12 at 20:24
up vote 0 down vote accepted

check_command check_by_ssh!check_haproxy -u 'http://localhost:10000/haproxy?stats\;csv'


share|improve this answer

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.