Module: check_mk
Branch: master
Commit: 696d82677d2b74570091e0d8ba26f8d4f58915f7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=696d82677d2b74…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 14 16:47:46 2011 +0100
heartbeat_crm: apply patches from Václav Ovsík
---
ChangeLog | 2 ++
agents/check_mk_agent.linux | 4 ++--
checks/heartbeat_crm | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ceda8f6..2db796d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -84,6 +84,8 @@
* logwatch: allow to classify messages based on their count (see
man page of logwatch for details)
* fileinfo: new check for monitoring age and size of files
+ * heartbeat_crm: apply patches from Václav Ovsík, so that the check
+ should work on Debian now.
1.1.12p5:
Multisite:
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 9e0b9bc..bcdf02e 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -330,9 +330,9 @@ fi
if which cl_status > /dev/null 2>&1; then
# Different handling for heartbeat clusters with and without CRM
# for the resource state
- if [ -S /var/run/heartbeat/crm/cib_ro ]; then
+ if [ -S /var/run/heartbeat/crm/cib_ro -o -S /var/run/crm/cib_ro ]; then
echo '<<<heartbeat_crm>>>'
- crm_mon -1 -r | grep -v ^$ | sed 's/^\s/_/g'
+ crm_mon -1 -r | grep -v ^$ | sed '/^\sResource Group:/,$ s/^\s//; s/^\s/_/g'
else
echo '<<<heartbeat_rscstatus>>>'
cl_status rscstatus
diff --git a/checks/heartbeat_crm b/checks/heartbeat_crm
index 2f7b8f4..0c5444b 100644
--- a/checks/heartbeat_crm
+++ b/checks/heartbeat_crm
@@ -64,7 +64,7 @@ def heartbeat_crm_parse_general(info, dc = '', numNodes = -1,
numResources = -1)
lastUpdated = ' '.join(line[2:])
elif dc == '' and ' '.join(line[0:2]) == 'Current DC:'
and heartbeat_crm_naildown:
dc = line[2]
- elif numNodes == -1 and ' '.join(line[1:3]) == 'Nodes
configured.':
+ elif numNodes == -1 and ' '.join(line[1:3])[:-1] == 'Nodes
configured':
numNodes = int(line[0])
elif numResources == -1 and ' '.join(line[1:3]) == 'Resources
configured.':
numResources = int(line[0])