我正在尝试根据本教程启动一项服务:
Description=Prometheus Time Series Collection and Processing Server
Wants=network-online.target
After=network-online.target
[Service]
User=prometheus
Group=prometheus
Type=simple
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:9091"
[Install]
WantedBy=multi-user.target但是每次我用日志获取Failed to enable unit: File prometheus.service: Invalid argument时:
systemd[1]: /etc/systemd/system/prometheus.service:10: Ignoring unknown escape sequences: "\"
systemd[1]: /etc/systemd/system/prometheus.service:11: Missing '='.我试过纳诺和维。
发布于 2021-10-15 07:17:02
start Prometheus的命令应该是:
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:9091"检查= in --config-file和--storage.tsdb.path。并移除尾随空间
https://unix.stackexchange.com/questions/673283
复制相似问题