![Prometheus 的 Systemd 服务创建](https://linux22.com/image/210915/Prometheus%20%E7%9A%84%20Systemd%20%E6%9C%8D%E5%8A%A1%E5%88%9B%E5%BB%BA.png)
甲骨文Linux 8
尝试从 systemd 启动 prometheus 并收到status=203/EXEC
错误。我可以复制/粘贴命令/etc/systemd/system/prometheus.service
,它将毫无错误地启动。 prometheus 用户(未登录)和组存在。这是我的普罗米修斯.服务:
[Unit]
Description=Prometheus
Documentation=https://prometheus.io/docs/introduction/overview/
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
Environment="GOMAXPROCS=1"
User=prometheus
Group=prometheus
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/local/bin/prometheus \
--config.file=/etc/prometheus/prometheus.yml \
--storage.tsdb.path=/var/lib/prometheus \
--web.console.templates=/etc/prometheus/consoles \
--web.console.libraries=/etc/prometheus/console_libraries \
--web.listen-address=0.0.0.0:9090 \
--web.external-url=
SyslogIdentifier=prometheus
Restart=always
[Install]
WantedBy=multi-user.target