prometheus / prometheus/node_exporter
Add mounts status to node_systemd_unit_state metric
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.8k
- Forks
- 2.7k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 8
Description
Use-case:
Monitor that all defined mountpoints are currently mounted
Current situation:
No metrics expose the content of /etc/fstab, which make impossible to monitor that all mounts defined there are really mounted
On RHEL-like OSes, systemctl show the status of the mounts, but these are not being reported back by metric node_systemd_unit_state
Proposal:
Modify code for metric node_systemd_unit_state in order to include the mounts. Then metric node_systemd_unit_state
could be used to ensure all defined mounts are mounted
Example: I have unmounted /boot/efi on a server. Systemd reflects it perfectly well:
(0)LAB(VM)root@SERVER:/proc/net/stat# systemctl -a | egrep '.mount' | grep loaded | grep boot
boot-efi.mount loaded inactive dead /boot/efi
boot.mount loaded active mounted /boot
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 with the node_systemd_unit_state metric implementation and trace how systemd unit states are collected. Compare the reported units with the .mount units shown by systemctl, then identify the relevant tests; done means defined mountpoints and their active or inactive states are exposed through node_systemd_unit_state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100