Module: check_mk
Branch: master
Commit: 799352031e9e8a7b5d12bd203e267de08a6350f3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=799352031e9e8a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Oct 29 18:36:21 2011 +0200
FIX: drbd: fixed inventory functions
---
ChangeLog | 1 +
checks/drbd | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7f09a6e..76fb053 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,7 @@
* FIX: printer_supply: fix Perf-O-Meter if no max known
* FIX: Added id parameter to render_statistics() method to allow more than
one pie dashlet for host/service stats
+ * FIX: drbd: fixed inventory functions
Multisite:
* FIX: finally fixed long-wanted "NagStaMon create hundreds
diff --git a/checks/drbd b/checks/drbd
index 1b58614..f7a07ee 100644
--- a/checks/drbd
+++ b/checks/drbd
@@ -168,7 +168,7 @@ drbd_cs_map = {
'VerifyS': 0, 'VerifyT': 0,
}
-def inventory_drbd(info):
+def inventory_drbd(info, checktype):
inventory = []
for line in info[2:]:
if drbd_block_start_match.search(line[0]) > 0:
@@ -326,7 +326,7 @@ def check_drbd_stats(item, params, info):
return (3, "UNKNOWN - Undefined state")
-check_info['drbd'] = (check_drbd_general, "DRBD %s status", 1,
inventory_drbd)
-check_info['drbd.net'] = (check_drbd_net, "DRBD %s net", 1,
inventory_drbd)
-check_info['drbd.disk'] = (check_drbd_disk, "DRBD %s disk", 1,
inventory_drbd)
-check_info['drbd.stats'] = (check_drbd_stats, "DRBD %s stats", 1,
inventory_drbd)
+check_info['drbd'] = (check_drbd_general, "DRBD %s status", 1,
lambda info: inventory_drbd(info, "drbd"))
+check_info['drbd.net'] = (check_drbd_net, "DRBD %s net", 1,
lambda info: inventory_drbd(info, "drbd.net"))
+check_info['drbd.disk'] = (check_drbd_disk, "DRBD %s disk", 1,
lambda info: inventory_drbd(info, "drbd.disk"))
+check_info['drbd.stats'] = (check_drbd_stats, "DRBD %s stats", 1,
lambda info: inventory_drbd(info, "drbd.stats"))