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

When I execute

sudo -u nagios /usr/lib64/nagios/plugins/check_by_ssh.sh 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
1  
what does check_by_ssh.sh 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 check_by_ssh.sh? A shell script that wraps the standard command, or something else? Nagios wiki refers to techrepublic.com/blog/opensource/… as an example for using the standard command. –  cjc Oct 15 '12 at 20:24

1 Answer 1

up vote 0 down vote accepted

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

worked.

share|improve this answer

Your Answer

 
discard

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.