From 996563f9729588660d5d32826c46b0d7169b1334 Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen Date: Sat, 1 Jan 2022 15:09:20 +0200 Subject: [PATCH] filesystem_linux: exclude mounts under /var/lib/containers/storage analogous to the /var/lib/docker exclude added in https://github.com/prometheus/node_exporter/pull/814 podman rootful containers mount eg. shm filesystems at /var/lib/containers/storage/*-containers/*/userdata/shm. these should be treated like things under /var/lib/docker by default. Signed-off-by: Lauri Tirkkonen --- 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 a5c6bf31..19ad8145 100644 --- a/collector/filesystem_linux.go +++ b/collector/filesystem_linux.go @@ -33,7 +33,7 @@ import ( ) const ( - defMountPointsExcluded = "^/(dev|proc|run/credentials/.+|sys|var/lib/docker/.+)($|/)" + defMountPointsExcluded = "^/(dev|proc|run/credentials/.+|sys|var/lib/docker/.+|var/lib/containers/storage/.+)($|/)" defFSTypesExcluded = "^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$" )