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

Monitoring multiple user systemd units #141

Open
beeritis opened this issue Sep 19, 2024 · 0 comments
Open

Monitoring multiple user systemd units #141

beeritis opened this issue Sep 19, 2024 · 0 comments

Comments

@beeritis
Copy link

beeritis commented Sep 19, 2024

Hi,

We've got the systemd exporter working and is able to collect user metrics (e.g. any user systemd units).
However - this only is possible to run as one user by either:
a) Run a systemd unit as a specific user , ,set the Environment to XDG_RUNTIME_DIR=/run/user/<uid?>
b) Run a user systemd unit e.g. the service would be started with systemctl --user

Both these approaches work for monitoring systemd services within the user scope.

However - is it possible to monitor multiple user's systemd services without having to set a up a systemd service for each user and on different ports ?

I.e From a very manual perspective, we can see a specific user's systemd state using a command like systemctl --user --machine=<user>@ status --type=service . My example is using root but this can probably be achieved if a dedicated user has the relevant permissions for accessing dbus .

Can the exporter monitor multiple users or does this have to be done user by user and on a different port for each?

Edit , this may be the same as #134 but still would be good to know the feasibility

Thanks,

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