From d999dacdc63e39d11d560ba8a2609cd1da9c52eb Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Wed, 26 Sep 2018 10:45:51 +0200 Subject: [PATCH] filesystem: Ignore netns/nsfs mounts (#1047) When starting Docker containers a whole bunch of netns (network namespace) mounts are created that the node exporter can't make any sense of (and can't read either). This ignores all nsfs filesystems. Fixes #875 Signed-off-by: Daniele Sluijters --- collector/filesystem_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/filesystem_linux.go b/collector/filesystem_linux.go index 04c21a69..5e2e37b5 100644 --- a/collector/filesystem_linux.go +++ b/collector/filesystem_linux.go @@ -28,7 +28,7 @@ import ( const ( defIgnoredMountPoints = "^/(dev|proc|sys|var/lib/docker/.+)($|/)" - defIgnoredFSTypes = "^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$" + defIgnoredFSTypes = "^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$" readOnly = 0x1 // ST_RDONLY mountTimeout = 30 * time.Second )