-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZFS snapshots showing up among filesystems #2152
Comments
Yes it is indeed related to the "opening" on the snapshots:
I tried this on a different host than the bug opening host. I verified this on |
We're just exposing /proc/1/mounts, so I'm surprised that You could set |
FreeBSD doesn't mount |
It seems that this arrives from |
The ones you see are indeed the ones that have been mounted by accessing the They don't show up in a normal call to mount.c - skip printing ignored mounts unless verbose mode is enabled If you run |
A quick check of the FreeBSD source tree and commit history shows that this The major original use was to make It's not really documented but it definitely seems to be the intent that these are hidden mounts that don't need to be reported on. I would agree with @lapo-luchini that these probably shouldn't be reported by the collector. |
It's almost a one-liner; should I can create a PR anyways? |
+1
Yes please! |
Closes prometheus#2152. Signed-off-by: Lapo Luchini <lapo@lapo.it>
* Ignore filesystems flagges as MNT_IGNORE. Closes #2152. Signed-off-by: Lapo Luchini <lapo@lapo.it>
* Ignore filesystems flagges as MNT_IGNORE. Closes #2152. Signed-off-by: Lapo Luchini <lapo@lapo.it>
* Ignore filesystems flagges as MNT_IGNORE. Closes prometheus#2152. Signed-off-by: Lapo Luchini <lapo@lapo.it>
* Ignore filesystems flagges as MNT_IGNORE. Closes prometheus#2152. Signed-off-by: Lapo Luchini <lapo@lapo.it>
Host operating system: output of
uname -a
FreeBSD (hostname) 13.0-RELEASE-p4 FreeBSD 13.0-RELEASE-p4 #0: Tue Aug 24 07:33:27 UTC 2021 root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
node_exporter version: output of
node_exporter --version
node_exporter command line flags
/usr/local/bin/node_exporter --web.listen-address=:9100 --collector.textfile.directory=/var/tmp/node_exporter
Are you running node_exporter in Docker?
No.
What did you do that produced an error?
http http://localhost:9100/metrics | egrep 'device="[^@+]+@' | head
What did you expect to see?
Nothing at all (only actual filesystems, no snapshots).
What did you see instead?
Please note that
% mount | fgrep -c @
returns0
, i.e. no snapshot is explicitly mounted in the system.Something even stranger: only a small fraction of snapshots do show up there.
Maybe those are the ones that one time or the other I access (by using
.zfs/snapshot/name
)?I still would expect
node_exporter
to ignore any and all snapshots… I can fix this during scraping to avoid those lines, but I would prefer to avoid enumerating them rather than doing some work and then throw it away during scraping.The text was updated successfully, but these errors were encountered: