Module: check_mk
Branch: master
Commit: 82c398bdfc1cb59144d222a6f891cb14af7f15b9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=82c398bdfc1cb5…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Wed Sep 27 15:16:52 2017 +0200
df: Fix btrfs compatibility issue introduced in Werk #4806
Change-Id: I3bada28b8baef79c1848f7941663a36d9c5f76fe
---
checks/df | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/checks/df b/checks/df
index 905d0ae..9d4a62d 100644
--- a/checks/df
+++ b/checks/df
@@ -114,11 +114,13 @@ def parse_df(info):
if line[2] == "File" and line[3] == "System":
line = [ line[0], " ".join(line[1:4]) ] + line[4:]
+ # This particular bit of magic originated in Werk #2671 and has the purpose
of avoiding duplicate checks,
+ # as btrfs filesystems are often mounted at multiple mountpoints. We keep it
for compatibility.
if line[1] == "btrfs":
device = line[0]
if device not in btrfs_devices:
btrfs_devices.add(device)
- mountpoint = device
+ mountpoint = "btrfs " + device
else:
mountpoint = " ".join(line[6:]).replace('\\',
'/') # Windows \ is replaced with /