我想使用 Grafana/Prometheus 从组件收集指标。Grafana、Prometheus、node_exporter 和 Wildfly 运行良好。
我想收集来自以下方面的指标:
- http://localhost:9090/metrics (Prometheus 本身)
- http://localhost:9182/metrics (节点导出器)
- http://localhost:9990/metrics(Wildfly)
- http://localhost:8080/application/rest/metrics (我在 Wildfly 中的应用程序)
如何配置它prometheus.yml
?我尝试了以下方法,但是不起作用:
scrape_configs:
- job_name: "prometheus"
metrics_path: "/metrics"
static_configs:
- targets: ["localhost:9100", "localhost:9990", "localhost:9090"]
labels:
group: 'system'
- job_name: "application"
metrics_path: "/application/rest/metrics"
static_configs:
- targets: ["localhost:8080"]
labels:
group: 'application'