Module: check_mk
Branch: master
Commit: 397a28f5cebb14dd51d44b87cb1f89c3e68890db
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=397a28f5cebb14…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Feb 25 13:52:41 2011 +0100
drbd: handle output of older version
---
ChangeLog | 4 ++++
checks/drbd | 7 +++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6b1bd57..5d1ebe7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+1.1.10b1:
+ Checks & Agents:
+ * FIX: drbd now handles output of older version without an ep field
+
1.1.9i9:
Core, Setup, etc.:
* FIX: check_mk_templates.cfg: add missing check_period for hosts
diff --git a/checks/drbd b/checks/drbd
index dd2cf5a..6e5e8be 100644
--- a/checks/drbd
+++ b/checks/drbd
@@ -311,9 +311,12 @@ def check_drbd_stats(item, params, info):
for key, label in [ ('al', 'activity log updates'),
('bm', 'bit map updates'),
('lo', 'local count requests'),
('pe', 'pending requests'),
('ua', 'unacknowledged requests'),
('ap', 'application pending requests'),
- ('ep', 'epch objects'),
('wo', 'write order'),
+ ('ep', 'epoch objects'),
('wo', 'write order'),
('oos', 'kb out of sync') ]:
- output += '%s: %s, ' % (label, parsed[key])
+ if key in parsed:
+ output += '%s: %s, ' % (label, parsed[key])
+ else:
+ parsed[key] = 0 # perfdata must always have same number of entries
perfdata.append(('%s' % label.replace(" ", "_"),
parsed[key]))
return (0, 'OK - ' + output.rstrip(', '), perfdata)