Module: check_mk
Branch: master
Commit: 3e5322b46dcfd783e7ffe427e520f9ba4e67a759
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3e5322b46dcfd7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 15:09:41 2013 +0100
FIX df: now ignores filesystems with a reported size of '-'
Previous versions of the check raised an exception because the '-'
could not be converted via int().
---
.werks/358 | 11 +++++++++++
ChangeLog | 1 +
checks/df | 3 +--
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/358 b/.werks/358
new file mode 100644
index 0000000..278eb0b
--- /dev/null
+++ b/.werks/358
@@ -0,0 +1,11 @@
+Title: df: now ignores filesystems with a reported size of '-'
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387202921
+Targetversion: future
+
+Previous versions of the check raised an exception because the '-'
+could not be converted via int().
diff --git a/ChangeLog b/ChangeLog
index 80ddcf8..a9d1b67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,7 @@
* 0334 FIX: cisco_fantray: Fixed error on Cisco devices which do not support this
check...
* 0355 FIX: heartbeat_crm: Now handling "Failed actions:" output in
agent...
* 0357 FIX: megaraid_bbu: Fixed expected state checking...
+ * 0358 FIX: df: now ignores filesystems with a reported size of '-'...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in
Chrome/IE
diff --git a/checks/df b/checks/df
index 516cc4e..e67770c 100644
--- a/checks/df
+++ b/checks/df
@@ -37,8 +37,7 @@ def inventory_df(info):
if line[1] in inventory_df_exclude_fs:
continue # ignore this filesystem type
- size_kb = int(line[2])
- if size_kb == 0 or line[5] == '-':
+ if line[2] == '-' or int(line[2]) == 0 or line[5] == '-':
continue # exclude filesystems without size
mountpoint = " ".join(line[6:]).replace('\\', '/') #
Windows \ is replaced with /