Module: check_mk
Branch: master
Commit: 39be35628be1e25fc71bcc077ca37c09a3992d56
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=39be35628be1e2…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 8 11:54:06 2019 +0100
Updated haproxy section to also handle /var/lib/haproxy/stats
Change-Id: I4741861de154bc449ea24a2ad780ea255aa2684f
---
agents/check_mk_agent.linux | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 8e895b0..5e42273 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -1032,10 +1032,12 @@ if type pvecm > /dev/null 2>&1 ; then
pvecm nodes
fi
-if [ -r /run/haproxy/admin.sock ] && type socat >/dev/null 2>&1; then
- echo "<<<haproxy:sep(44)>>>"
- echo "show stat" | socat - UNIX-CONNECT:/run/haproxy/admin.sock
-fi
+for HAPROXY_SOCK in /run/haproxy/admin.sock /var/lib/haproxy/stats; do
+ if [ -r "$HAPROXY_SOCK" ] && type socat >/dev/null 2>&1;
then
+ echo "<<<haproxy:sep(44)>>>"
+ echo "show stat" | socat - "UNIX-CONNECT:$HAPROXY_SOCK"
+ fi
+done
# Start new liveupdate process in background on each agent execution. Starting
# a new live update process will terminate the old one automatically after