The Linux agent already has a section for HA-Proxy included:
section_haproxy() {
for HAPROXY_SOCK in /run/haproxy/admin.sock /var/lib/haproxy/stats; do
if [ -r "${HAPROXY_SOCK}" ] && inpath socat; then
echo "<<<haproxy:sep(44)>>>"
echo "show stat" | socat - "UNIX-CONNECT:${HAPROXY_SOCK}"
fi
done
}
As long as your HA-Proxy socket is either /run/haproxy/admin.sock or /var/lib/haproxy/stats it should be detected automatically. And you need socat installed on the host.
You could create a symlink ln -s /var/lib/haproxy18 /var/lib/haproxy or change the HA-Proxy configuration to use a standard path. Why would the version number be included in the directory name?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.