-
Notifications
You must be signed in to change notification settings - Fork 34
Monitor user unit services #134
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
Comments
I have the same issue and I struggle to get it working :( i am running systemd exporter as root and expect it to get all metric for root and all users. |
I end up making systemd-exporter run in the same user as the service being monitored and adding
|
I was able to get systemd_exporter exporting metrics about user systemd services (which, in my case, are other podman quadlets) with the following podman quadlet ( $ cat ~/.config/containers/systemd/systemd_exporter.container
[Container]
ContainerName=systemd_exporter
Environment=XDG_RUNTIME_DIR=/run/user/1001
Exec=--log.level=info --systemd.collector.user --systemd.collector.enable-restart-count --systemd.collector.enable-ip-accounting --systemd.collector.unit-include=woodpecker-server.service|woodpecker-agent.service|grafana.service|minio.service|prometheus.service|gateway.service|alertmanager.service|loki.*.service|radicle.*.service
Group=1001
Image=quay.io/prometheuscommunity/systemd-exporter:main
LogDriver=journald
PublishPort=9668:9558
User=1001
UserNS=keep-id:uid=1001,gid=1001
Volume=/proc:/host/proc:ro
Volume=/run/systemd:/run/systemd:ro
Volume=/run/user/1001:/run/user/1001:ro
PodmanArgs=--restart on-failure
AutoUpdate=local
[Unit]
After=podman-user-wait-network-online.service
[Install]
WantedBy=default.target |
In some cases I want to monitor systemd services setup as a user unit
checking the systemd status from outside won't work
The text was updated successfully, but these errors were encountered: