Module: check_mk
Branch: master
Commit: 4a16a79edaf978f435c4813e0f187cad62067da9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4a16a79edaf978…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jan 8 13:43:09 2014 +0100
FIX heartbeat_crm: Inventory more gracefully handles case where agent output is invalid
One example:
F+:
<<<heartbeat_crm>>>
Connection to cluster failed: connection failed
F-:
The inventory raised an exception in that case. Now it simply ignores that section.
---
.werks/440 | 17 +++++++++++++++++
ChangeLog | 1 +
checks/heartbeat_crm | 11 +++++++----
3 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/.werks/440 b/.werks/440
new file mode 100644
index 0000000..74f69d7
--- /dev/null
+++ b/.werks/440
@@ -0,0 +1,17 @@
+Title: heartbeat_crm: Inventory more gracefully handles case where agent output is
invalid
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1389184898
+Targetversion: future
+
+One example:
+
+F+:
+<<<heartbeat_crm>>>
+Connection to cluster failed: connection failed
+F-:
+
+The inventory raised an exception in that case. Now it simply ignores that section.
diff --git a/ChangeLog b/ChangeLog
index 82c992e..70a0e52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -78,6 +78,7 @@
* 0435 FIX: esx_vsphere_sensors: Fix garbled output in case of placeholder VMs...
* 0251 FIX: agent_vsphere / check_mk agent: fixed outdated systemtime of check_mk
agent...
* 0439 FIX: postfix_mailq: Linux agent better detects Postfix installation...
+ * 0440 FIX: heartbeat_crm: Inventory more gracefully handles case where agent output
is invalid...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checks/heartbeat_crm b/checks/heartbeat_crm
index e5e2611..cf13909 100644
--- a/checks/heartbeat_crm
+++ b/checks/heartbeat_crm
@@ -83,10 +83,13 @@ def inventory_heartbeat_crm(info):
# - Check the number of nodes/resources
# - Check the age of "last updated"
if len(info) > 0:
- lastUpdated, dc, numNodes, numResources = heartbeat_crm_parse_general(info)
- if not heartbeat_crm_naildown:
- dc = None # Ignore DC on check
- return [(None, '(heartbeat_crm_default_max_age, %r, %d, %d)' % (dc,
numNodes, numResources))]
+ try:
+ lastUpdated, dc, numNodes, numResources = heartbeat_crm_parse_general(info)
+ if not heartbeat_crm_naildown:
+ dc = None # Ignore DC on check
+ return [(None, '(heartbeat_crm_default_max_age, %r, %d, %d)' % (dc,
numNodes, numResources))]
+ except:
+ return # No useful information found
def check_heartbeat_crm(item, params, info):
if len(info) > 0: