Prometheus监视错误“度量标准后的期望值,目标端点为\“ MNAME \”“

时间:2019-10-16 07:33:18

标签: monitoring prometheus

我在机器上设置了prometheus并测试了运行prometheus的默认端点(即localhost:9090)的指标。它工作正常。现在将目标更改为本地运行的服务器的端点后,出现错误,因此没有能够获取端点的任何指标。

新端点-http://0.0.0.0:8090/health

错误消息:

level = warn ts = 2019-10-16T07:12:28.713Z呼叫者= scrape.go:930 component =“ scrape manager” scrape_pool = prometheus target = http://0.0.0.0:8090/health msg =“ append failed” err =“指标后的期望值,为\“ MNAME \”“

附加prometheus.yml文件的屏幕快照以验证配置。 enter image description here

1 个答案:

答案 0 :(得分:1)

您确定您的/health端点产生了Prometheus指标吗?普罗米修斯希望刮擦看起来像这样的东西:

# HELP alertmanager_alerts How many alerts by state.
# TYPE alertmanager_alerts gauge
alertmanager_alerts{state="active"} 7
alertmanager_alerts{state="suppressed"} 0
# HELP alertmanager_alerts_invalid_total The total number of received alerts that were invalid.
# TYPE alertmanager_alerts_invalid_total counter
alertmanager_alerts_invalid_total{version="v1"} 0
alertmanager_alerts_invalid_total{version="v2"} 0

这与在浏览器中打开http://host:8090/health时看到的内容相似吗?根据您看到的错误消息,我对此表示严重怀疑。