【发布时间】:2019-09-16 13:23:46
【问题描述】:
这是我的配置:
management.metrics.export.prometheus=true
management.metrics.export.prometheus.pushgateway.enabled=true
management.metrics.export.prometheus.pushgateway.push-rate=1m
management.metrics.export.prometheus.pushgateway.base-url=<IP>:9091
management.metrics.export.prometheus.pushgateway.job=myjob
查看 PushGateway 的 <IP>:9091/metrics 端点,我看到以下标签:
{instance="",job="myjob"}
理想情况下,我希望“实例”是正在运行的服务的 IP 地址和端口。
值得一提的是,我在 Promethoues conf 中使用了honor_labels: true。
如何设置(如果可能,自动设置)实例标签?
谢谢
【问题讨论】:
标签: spring-boot prometheus prometheus-pushgateway