Skip to content
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

Feature request: Recursive systemd unit monitoring #2830

Closed
bjornfor opened this issue Oct 22, 2023 · 3 comments
Closed

Feature request: Recursive systemd unit monitoring #2830

bjornfor opened this issue Oct 22, 2023 · 3 comments

Comments

@bjornfor
Copy link
Contributor

systemd can connect to systemd inside systemd-nspawn containers to provide a unified view of services from the host.

$ sudo systemctl list-units --recursive
[...normal units *and* units inside systemd-nspawn containers,
    which are prefixed with `<container_name>:`...]

Having this "recursive" option in node_exporter would provide easy and robust monitoring of the whole system.

I found that node_exporter uses https://github.com/coreos/go-systemd to get the state of units, which in turn queries systemd over D-Bus using the org.freedesktop.systemd1.Manager.ListUnits method. I'm not sure if this feature request needs changes to systemd (expose recursive ListUnits?), or if this info can be obtained somehow using multiple D-Bus calls today.

Also worth mentioning is that the systemd CLI (above example) requires root privileges for the --recursive option.

@jpds
Copy link
Contributor

jpds commented Nov 23, 2023

A better place for this would be https://github.com/prometheus-community/systemd_exporter/

@bjornfor
Copy link
Contributor Author

@discordianfish
Copy link
Member

Ok then let's close this and discuss over at prometheus-community/systemd_exporter#116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants