我在Ubuntu计算机中设置了Prometheus,它现在在localhost:9090
上运行。但是,当我运行以下命令时,我的状态会失败。
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的语法错误,并成功通过了。
还有其他方法可以解决此问题吗?
答案 0 :(得分:1)
检查它是否仍在任务管理器上运行,然后从那里杀死它的任务,这将起作用。
答案 1 :(得分:0)
输出显示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)
这将有助于查找有关启动失败的其他信息。