Module: check_mk
Branch: master
Commit: 6e07920f40a372467be2878b2637354494e42515
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6e07920f40a372…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Oct 24 13:59:29 2012 +0200
zfslist: fix mixed up columns avail and total
---
checks/zfslist | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/checks/zfslist b/checks/zfslist
index 9130850..406e42f 100644
--- a/checks/zfslist
+++ b/checks/zfslist
@@ -38,7 +38,7 @@
# rpool/export/opt 842M 887G /opt
# rpool/swap 8.00G 893G -
#
-# The columns are: name, used, avail, mountpoint
+# The columns are: name, used, total, mountpoint
def inventory_zfslist(info):
@@ -62,12 +62,11 @@ def convert_zfssize(txt):
def check_zfslist(item, params, info):
fslist = []
- for name, used_txt, avail_txt, mountpoint in info:
+ for name, used_txt, total_txt, mountpoint in info:
if "patterns" in params or item == mountpoint:
used_mb = convert_zfssize(used_txt)
- avail_mb = convert_zfssize(avail_txt)
- size_mb = used_mb + avail_mb
- fslist.append((mountpoint, size_mb, avail_mb))
+ total_mb = convert_zfssize(total_txt)
+ fslist.append((mountpoint, total_mb, total_mb - used_mb))
return df_check_filesystem_list(item, params, fslist)