[英]Prometheus not expose all collected metrics
I have configured Prometheus to scrape metrics for a few sources.我已将 Prometheus 配置为抓取一些来源的指标。
The problem is.问题是。
In Prometheus UI I can see all targets and in graph I can query all metrics include nodejs related.在 Prometheus UI 中,我可以看到所有目标,在图表中我可以查询所有指标,包括与 nodejs 相关的指标。 But if I do
curl http://localhost:9090/metrics
I see only metrics related to prometheus and node-exporter.但是,如果我确实
curl http://localhost:9090/metrics
我只会看到与 prometheus 和 node-exporter 相关的指标。 There is nothing related to nodejs applications or hazelcast.没有任何与 nodejs 应用程序或 hazelcast 相关的内容。
Direct request to nodejs applications curl http://localhost:8080/metrics
return all of those values without any problems.对 nodejs 应用程序的直接请求
curl http://localhost:8080/metrics
返回所有这些值,没有任何问题。
What could cause such a problem?什么会导致这样的问题?
This url : localhost:9090/metrics
is only here to expose the Prometheus metrics.这个 url :
localhost:9090/metrics
只是在这里公开 Prometheus 指标。 It is the one used by Prometheus to scrape itself.它是 Prometheus 用来刮擦自身的那个。 It has nothing to do with the application scraped by Prometheus.
它与 Prometheus 抓取的应用程序无关。
Also, node related metrics that you see here, are not the one exposed by the node_exporter (there can be some similarities).此外,您在此处看到的节点相关指标不是由 node_exporter 公开的指标(可能存在一些相似之处)。 If you want to see the node_exporter metrics, you need to go to
localhost:9100/metrics
(if you didn't change the default configuration).如果要查看 node_exporter 指标,则需要转到
localhost:9100/metrics
(如果您没有更改默认配置)。
Now to see the metrics scraped by Prometheus, you have the following options :现在要查看 Prometheus 抓取的指标,您有以下选项:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.