Skip to content

Feature request: Recursive systemd unit monitoring #116

Open
@bjornfor

Description

@bjornfor

(Originally posted at prometheus/node_exporter#2830, where it was suggested to post here.)

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 systemd_exporter would provide easy and robust monitoring of the whole system.

I found that systemd_exporter (and 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.

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