diff options
author | Daniele Sluijters <daenney@users.noreply.github.com> | 2018-09-26 10:45:51 +0200 |
---|---|---|
committer | Tobias Schmidt <tobidt@gmail.com> | 2018-09-26 10:45:51 +0200 |
commit | d999dacdc63e39d11d560ba8a2609cd1da9c52eb (patch) | |
tree | 25b92eea22fc12eed82755319b8ed16f4cd65a9a | |
parent | c7dfb82dac2d599d9eb3012b55a067a89f37f5c7 (diff) | |
download | prometheus_node_collector-d999dacdc63e39d11d560ba8a2609cd1da9c52eb.tar.bz2 prometheus_node_collector-d999dacdc63e39d11d560ba8a2609cd1da9c52eb.tar.xz prometheus_node_collector-d999dacdc63e39d11d560ba8a2609cd1da9c52eb.zip |
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 <daenney@users.noreply.github.com>
-rw-r--r-- | collector/filesystem_linux.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/collector/filesystem_linux.go b/collector/filesystem_linux.go index 04c21a6..5e2e37b 100644 --- a/collector/filesystem_linux.go +++ b/collector/filesystem_linux.go | |||
@@ -28,7 +28,7 @@ import ( | |||
28 | 28 | ||
29 | const ( | 29 | const ( |
30 | defIgnoredMountPoints = "^/(dev|proc|sys|var/lib/docker/.+)($|/)" | 30 | defIgnoredMountPoints = "^/(dev|proc|sys|var/lib/docker/.+)($|/)" |
31 | defIgnoredFSTypes = "^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$" | 31 | defIgnoredFSTypes = "^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$" |
32 | readOnly = 0x1 // ST_RDONLY | 32 | readOnly = 0x1 // ST_RDONLY |
33 | mountTimeout = 30 * time.Second | 33 | mountTimeout = 30 * time.Second |
34 | ) | 34 | ) |