FS#74548 - [prometheus-bird-exporter] Exporter cannot access bird control socket
Attached to Project:
Community Packages
Opened by Brian BIdulock (bidulock) - Sunday, 24 April 2022, 10:19 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:03 GMT
Opened by Brian BIdulock (bidulock) - Sunday, 24 April 2022, 10:19 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:03 GMT
|
Details
Description:
The configuration of prometheus-bird-exporter.service is restricting it from accessing the /run/bird/bird.ctl socket necessary for it to scrape metrics. This is because it is run with User=bird_exporter Group=bird_exporter which prohibit it from accessing the /run/bird/bird.ctl socket. Additional info: * package version(s) bird 2.0.9-2 prometheus-bird-exporter 1.2.6-1 * config and/or log files etc. #/etc/conf.d/prometheus-bird-exporter BIRD_EXPORTER_ARGS="-bird.v2=true -bird.socket /run/bird/bird.ctl" above config otherwise prometheus-bird-exporter.service looks for control socket in /var/run/bird.ctl by default. * link to upstream bug report, if any Steps to reproduce: Install bird and prometheus-bird-exporter $> systemctl start bird.service $> prometheus-bird-exporter -bird.v2=true -bird.socket /run/bird/bird.ctl & $> curl localhost:9324/metrics The above two will work (as prometheus-bird-exporter is run as root). $> kill %1 $> systemctl start prometheus-bird-exporter.service $> curl localhost:9324/metrics $> systemctl status prometheus-bird-exporter.service Above yields: Apr 24 03:58:57 hamm prometheus-bird-exporter[676776]: time="2022-04-24T09:58:57Z" level=error msg="dial unix /run/bird/bird.ctl: connect: permission denied" Apr 24 03:59:00 hamm prometheus-bird-exporter[676776]: time="2022-04-24T09:59:00Z" level=error msg="dial unix /run/bird/bird.ctl: connect: permission denied" |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:03 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/prometheus-bird-export er/issues/1
Saturday, 25 November 2023, 20:03 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/prometheus-bird-export er/issues/1
sorry for the late reply. The own user/group is on purpose. The idea is that you add the bird_exporter user to the bird group. This is currently not done by the package itself ( I think that's not possible, but I'm not sure). I could add a postinstall message that informs user about it. If you prefer to run the exporter as root, you can use a systemd dropin file to overwrite the User/Group settings.
Does that help you?
m bird_exporter bird
Please do this to avoid breaking existing installations during upgrade. Thank you.
m bird_exporter bird
to the prometheus-bird-exporter.conf file that you are already installing in /usr/lib/sysusers.d