Page 1 of 1

/var/run/haproxy.sock connect: Permission denied

Posted: Wed Aug 17, 2016 1:02 pm
by kaushalshriyan
Hi,

I am using https://github.com/tatref/nagios-scripts check_haproxy_stats.pl to monitor HaProxy reverse proxy server. I am getting the below issue when i invoke the command from Nagios Server.

/usr/lib64/nagios/plugins/check_nrpe -H 172.16.213.158 -c check_haproxy_tomcat_testchat Unable to connect to haproxy socket:
/var/run/haproxy.sock connect: Permission denied at /usr/lib64/nagios/plugins/check_haproxy_stats.pl line 202.


/usr/lib64/nagios/plugins/check_haproxy_stats.pl -s /var/run/haproxy.sock -p tomcat_testchat -w 60 -c 80 configured in the nrpe.cfg file on the remote server

Please do let me know if you need any additional information.

Regards,

Kaushal

Re: /var/run/haproxy.sock connect: Permission denied

Posted: Wed Aug 17, 2016 1:48 pm
by tgriep
When a command is run on the remote system using the NRPE Agent, is runs as the nagios user account.
Make sure that the nagios user can access that folder and file so it can run correctly.
/var/run/haproxy.sock