From 97693e49b0edd1fe82f02a30486f12663e3854af Mon Sep 17 00:00:00 2001 From: Stefan Mayr Date: Sun, 10 May 2026 10:11:38 +0200 Subject: [PATCH] Fix detection of HAProxy Enterprise With recent versions of HAProxy Enterprise (HAPEE) the socket is no more created in a hapee subdirectory. Also /var/run is often only a link to /run. This change searches all currently known options and stops after the first socket found. --- agents/check_mk_agent.linux | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux index ac07a4b2318..37f482e5dd7 100755 --- a/agents/check_mk_agent.linux +++ b/agents/check_mk_agent.linux @@ -1455,10 +1455,11 @@ section_proxmox() { section_haproxy() { # Consider sockets for community v2.x and v3.x AND enterprise edition - for HAPROXY_SOCK in /run/haproxy/admin.sock /var/lib/haproxy/stats /var/run/haproxy.sock /var/run/hapee-*/hapee-lb.sock; do + for HAPROXY_SOCK in /run/haproxy/admin.sock /var/lib/haproxy/stats /var/run/haproxy.sock {,/var}/run{,/hapee-*}/hapee-lb.sock; do if [ -r "${HAPROXY_SOCK}" ] && inpath socat; then echo "<<>>" echo "show stat" | socat - "UNIX-CONNECT:${HAPROXY_SOCK}" + break fi done }