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

No metrics for podman generated unit files. #60

Open
Skipper0707 opened this issue Sep 4, 2022 · 0 comments
Open

No metrics for podman generated unit files. #60

Skipper0707 opened this issue Sep 4, 2022 · 0 comments

Comments

@Skipper0707
Copy link

Skipper0707 commented Sep 4, 2022

Hello;

This exporter is amazing and satisfies all my monitoring needs, the only problem is that I have several unit files related to podman which reside in /home/user/.config/systemd/user and I want to be able to monitor them too, however, using the following syntax didn't work. I'm sure I'm doing something wrong.

./systemd_exporter --systemd.collector.unit-include="/home/user/.config/systemd/user/.*"
./systemd_exporter --systemd.collector.unit-include="/home/user/.config/systemd/user/*"
./systemd_exporter --systemd.collector.unit-include=/home/user/.config/systemd/user/.*\.service

The service files generated by podman do not show up in the metrics by default. I even have the podman.service so I gather the problem with those is that they're on a rather different path than the default.

UPDATE: I noticed when I run the systemd_exporter without the mentioned flag, everything works and I start to see metrics in Prometheus but when I use the flag, it not only doesn't include the set path but, it doesn't send any systems metrics at all.

UPDATE2: I tried the following:

systemctl link /home/user/.config/systemd/user/foo.serivce

And a symlink was made in /etc/systemd/system/ but after running the systemd_exporter the foo.service still didn't show up.

I have to mention these service files are generated using podman generate systemd via the rootless user and can be managed using systemctl --user status/restart/stop... foo.service, hope this information helps in helping me :)

Any help is appreciated, thanks in advance.

@Skipper0707 Skipper0707 changed the title [Question] Need help in including unit files No metrics for podman generated unit files. Sep 4, 2022
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

1 participant