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

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kaushalshriyan
Posts: 124
Joined: Fri May 22, 2015 7:12 am

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

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked