prometheus / prometheus/node_exporter
Filesystem metric to report on encrypted mounts
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.8k
- Forks
- 2.7k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 8
Description
Feature request
I´d like to have a metric about filesystems that reports whether the filesystem is encrypted or mounted on top of an encrypted block device. I would expect special devices to be excluded from this (ie: loop devices).
For example, for the following lsblk output:
$ lsblk -e 7
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 953.9G 0 disk
├─nvme0n1p1 259:1 0 512M 0 part /boot/efi
├─nvme0n1p2 259:2 0 732M 0 part /boot
└─nvme0n1p3 259:3 0 952.7G 0 part
└─nvme0n1p3_crypt 253:0 0 952.6G 0 crypt
├─vgubuntu-root 253:1 0 930.4G 0 lvm /
└─vgubuntu-swap_1 253:2 0 976M 0 lvm [SWAP]
I would expect / to be marked as encrypted, but neither /boot nor /boot/efi.
For filesystems like ZFS (or future Btrfs) with native encryption support this flag should also mark those mounts as encrypted when detected.
I would suggest introducing a new gauge metric node_filesystem_encrypted with the same tags as other node_filesystem_* metrics.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing node_filesystem_* metrics and the filesystem collector, then compare its behavior with the issue's lsblk -e 7 example. The finished work should expose node_filesystem_encrypted with matching tags, exclude loop devices, mark mounts backed by encrypted devices, and account for native filesystem encryption where detectable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, linux
- Domain
- observability, operating-systems, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100