Skip to content

Add mounts status to node_systemd_unit_state metric #3325

@lionelwidmer

Description

@lionelwidmer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions