It is world readable. Should be good, right? Apparently not.
I decided to sudo chmod 777 /var/run/haproxy/socket and reloaded telegraf. That worked. It appears that telegraf wants write permissions on the socket. Why is that?
How are others giving adequate access to socket files? Adding the telegraf user to the service group?
Telegraf also writes the show stat command to the socket. It should be possible to set the mode of the socket as a parameter to the stats socket option. If you could test this out then I’ll add it to the plugin documentation.
Just out of curiosity, why are you using HAProxy stats via socket instead of the http endpoint. I have found it to work more reliably that way. You can assign it to just localhost and put basic auth on it if you need to protect the stats
@daniel Thanks for the info, I will look into that.
@Esity This is just research at the moment. With telegraf running on the server in question, seems easier just to query the socket. Whereas if we are running telegraf remotely, hitting the http endpoints is the obvious choice. Of course, http works fine either way. You are saying that you have found the http endpoint to be more reliable than the socket?