Sample Header Ad - 728x90

Cannot run Prometheus or Blackbox Exporter with systemctl

0 votes
2 answers
1144 views
I installed the Prometheus Blackbox Exporter using this instruction set: https://devconnected.com/how-to-install-and-configure-blackbox-exporter-for-prometheus/ When I start the blackbox exporter from the command line it works fine:
/usr/local/bin/blackbox_exporter --config.file=/etc/blackbox/blackbox.yml --web.listen-address=":9115"
level=info ts=2023-05-09T15:18:12.170335169Z caller=main.go:213 msg="Starting blackbox_exporter" version="(version=0.14.0, branch=HEAD, revision=bba7ef76193948a333a5868a1ab38b864f7d968a)"
level=info ts=2023-05-09T15:18:12.17114947Z caller=main.go:226 msg="Loaded config file"
level=info ts=2023-05-09T15:18:12.171355458Z caller=main.go:330 msg="Listening on address" address=:9115
When I try to run it as a service it does not:
systemctl status blackbox_exporter
blackbox_exporter.service - Blackbox Exporter
   Loaded: loaded (/etc/systemd/system/blackbox_exporter.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2023-05-09 15:20:40 GMT; 5s ago
  Process: 22483 ExecStart=/usr/local/bin/blackbox_exporter --config.file /etc/blackbox_exporter/blackbox.yml (code=exited, status=1/FAILURE)
 Main PID: 22483 (code=exited, status=1/FAILURE)

May 09 15:20:40 hostname systemd: Started Blackbox Exporter.
May 09 15:20:40 hostname systemd: blackbox_exporter.service: main process exited, code=exited, status=1/FAILURE
May 09 15:20:40 hostname systemd: Unit blackbox_exporter.service entered failed state.
May 09 15:20:40 hostname systemd: blackbox_exporter.service failed.
I'm running Prometheus on another box, not sure if that will work with the blackbox exporter and Prometheus itself on separate boxes but something I wanted to try. I thought maybe for some reason not having Prometheus locally was causing problems so I tried installing Prometheus locally using this instruction set: https://devconnected.com/how-to-setup-grafana-and-prometheus-on-linux/ Unfortunately I have the same problem. I can fire up Prometheus just fine from the command line but cannot start it using sudo systemctl start prometheus. As I saw this being an issue on some other threads I researched, I'll also mention that SELinux is disabled on this particular machine. Thoughts anyone? TIA!
Asked by Chris Utter (1 rep)
May 9, 2023, 07:14 PM
Last activity: May 10, 2023, 05:27 PM