Module: check_mk
Branch: master
Commit: d789edf94baea6da5dc1bb38074d03d4b92e66ed
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d789edf94baea6…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Sun Jan 6 00:59:19 2019 +0100
Addition to #6829: mounts check now ignore squashfs aswell
Change-Id: I333bae55bddca88ecc15e040896ecd5895c96d3f
---
.werks/6829 | 6 ++++--
agents/check_mk_agent.linux | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/.werks/6829 b/.werks/6829
index 50917ac..aeaae43 100644
--- a/.werks/6829
+++ b/.werks/6829
@@ -1,4 +1,4 @@
-Title: squashfs is a read-only filesystem and is therefore not monitored
+Title: df mounts: Skip squashfs filesystems
Level: 1
Component: checks
Compatible: compat
@@ -7,4 +7,6 @@ Version: 1.6.0i1
Date: 1539336597
Class: fix
-
+The filesystem squashfs is a read-only filesystem and is therefore not monitored.
+This makes the df and mounts checks ignore e.g. the mounts that are created for
+snaps in newer Ubuntu versions.
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 13e9f56..4f81e61 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -427,7 +427,7 @@ fi
# Check mount options. Filesystems may switch to 'ro' in case
# of a read error.
echo '<<<mounts>>>'
-grep ^/dev < /proc/mounts
+grep ^/dev < /proc/mounts | grep -v " squashfs "
# processes including username, without kernel processes
echo '<<<ps>>>'