hi, I can't start prometheus with systemctl , thanks for any help.
1. vim /etc/systemd/system/prometheus.service
[Unit]
Description=prometheus
Wants=network-online.target
After=network-online.target
[Service]
User=prometheus
Group=prometheus
Type=simple
Restart=on-failure
ExecStart=/opt/prometheus/prometheus \
--config.file=/opt/prometheus/prometheus.yml \
--storage.tsdb.path=/opt/prometheus/data \
--web.console.templates=/opt/prometheus/consoles \
--web.console.libraries=/opt/prometheus/console_libraries
[Install]
WantedBy=multi-user.target
2. systemctl status prometheu
prometheus.service - prometheus
Loaded: loaded (/etc/systemd/system/prometheus.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Fri 2021-01-29 17:10:28 CST; 2min 59s ago
Process: 25576 ExecStart=/opt/prometheus/prometheus --config.file=/opt/prometheus/prometheus.yml --web.listen-address="
0.0.0.0:9696" --storage.tsdb.path=/opt/prometheus/data --web.console.templates=/opt/prometheus/consoles --web.console.libraries=/opt/prometheus/console_libraries (code=exited, status=2)
Main PID: 25576 (code=exited, status=2)
Jan 29 17:10:28 zluat55 systemd[1]: Unit prometheus.service entered failed state.
Jan 29 17:10:28 zluat55 systemd[1]: prometheus.service failed.
Jan 29 17:10:28 zluat55 systemd[1]: prometheus.service holdoff time over, scheduling restart.
Jan 29 17:10:28 zluat55 systemd[1]: Stopped prometheus.
Jan 29 17:10:28 zluat55 systemd[1]: start request repeated too quickly for prometheus.service
Jan 29 17:10:28 zluat55 systemd[1]: Failed to start prometheus.
Jan 29 17:10:28 zluat55 systemd[1]: Unit prometheus.service entered failed state.
Jan 29 17:10:28 zluat55 systemd[1]: prometheus.service failed.
3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
4. prometheus version is prometheus-2.24.1.linux-amd64.tar.gz