I followed the instructions here to configure HA Proxy for socket mode monitoring by Dynatrace.
I already had HA Proxy configured with a socket for administration (stats socket /var/run/haproxy/haproxy.sock mode 600 level admin). For security reasons, I don't want the Dynatrace plugin to access the admin socket.
Unfortunately, Dynatrace couldn't connect when my admin socket line was in the config file, the error was "Cannot connect to the stats socket. Please check file permissions."
Once I removed my admin socket, the plugin worked fine.
Does anyone know a way to have both and administration socket, and monitoring sockets available?
Solved! Go to Solution.
Currently there is none way of doing this. However this feature will be released with OneAgent 165, HA Proxy insights plugin version 2.0.12
It will be added to documentation, but you will have to add #DYNATRACE.SKIP before socket you dont want to use, for example:
stats socket /var/run/process1.sock mode 600 level operator process 1 user dtuser
stats socket /var/run/process2.sock mode 600 level operator process 2 user dtuser
stats socket /var/run/haproxy/admin.sock mode 660 level admin
stats timeout 30s