Module: check_mk
Branch: master
Commit: 04bcbfce8e1498a15ffa6d893274331b13783bff
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=04bcbfce8e1498…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Thu Dec 4 18:07:28 2014 +0100
write order is now included, but not in perfdata
---
checks/drbd | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/checks/drbd b/checks/drbd
index 0de3784..2b4dfe1 100644
--- a/checks/drbd
+++ b/checks/drbd
@@ -152,7 +152,7 @@ drbd_block_start_match = re.compile('^[0-9]+:')
drbd_general_map = [ 'cs', 'ro', 'ds' ]
drbd_net_map = [ 'cs', 'ns', 'nr' ]
drbd_disk_map = [ 'cs', 'dw', 'dr' ]
-drbd_stats_map = [ 'cs', 'al', 'bm', 'lo',
'pe', 'ua', 'ap', 'ep', 'oos' ]
+drbd_stats_map = [ 'cs', 'al', 'bm', 'lo',
'pe', 'ua', 'ap', 'ep', 'wo', 'oos' ]
drbd_cs_map = {
'StandAlone': 1, 'Disconnecting': 1,
@@ -417,7 +417,8 @@ def check_drbd_stats(item, params, info):
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]))
+ if parsed[key].isdigit():
+ perfdata.append(('%s' % label.replace(" ",
"_"), parsed[key]))
return (0, output.rstrip(', '), perfdata)
return (3, "Undefined state")