我已经在我的Ubuntu机器上设置了prometheus,它现在运行在localhost:9090
上。但是,当我运行以下命令时,我得到一个failed状态。
systemctl status prometheus
输出:
● prometheus.service - Prometheus
Loaded: loaded (/lib/systemd/system/prometheus.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2019-11-06 14:58:36 +0530; 8s ago
Main PID: 7046 (code=exited, status=1/FAILURE)
නෙවැ 06 14:58:36 ayesh systemd[1]: prometheus.service: Service hold-off time over, scheduling restart
නෙවැ 06 14:58:36 ayesh systemd[1]: prometheus.service: Scheduled restart job, restart counter is at 5
නෙවැ 06 14:58:36 ayesh systemd[1]: Stopped Prometheus.
නෙවැ 06 14:58:36 ayesh systemd[1]: prometheus.service: Start request repeated too quickly.
නෙවැ 06 14:58:36 ayesh systemd[1]: prometheus.service: Failed with result 'exit-code'.
නෙවැ 06 14:58:36 ayesh systemd[1]: Failed to start Prometheus.
我试图用以下命令重启普罗米修斯:
killall -HUP prometheus
sudo systemctl daemon-reload
sudo systemctl restart prometheus
和使用;
curl -X POST http://localhost:9090/-/reload
但它们对我不起作用。我已经使用'promtool‘检查了prometheus.yml的语法错误,并成功通过。
有没有其他方法来解决这个问题?
发布于 2019-11-06 22:51:39
检查它是否仍在您的任务管理器上运行,然后从那里终止它的任务,这将会起作用。
发布于 2019-12-13 06:09:43
输出显示prometheus启动失败。所以你不应该能杀死任何东西。只需使用以下命令检查您的进程:
ps -ef | [p]rometheus # the [p] is used to hide the grep process itself
使用以下命令查看有关prometheus的更多日志内容:
journalctl -t prometheus
在目录/var/log中的日志文件中也可能包含更多信息,尤其是在/var/ log /messages和/或/var/log/syslog中。
出于调试目的,只需通过执行以下命令在前台启动prometheus:
$(which prometheus)
这将有助于查找有关失败启动的其他信息。
https://stackoverflow.com/questions/58727671
复制相似问题