Here's my config:
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
Looking at the <IP>:9091/metrics
endpoint of PushGateway, I see the following tags:
{instance="",job="myjob"}
Ideally, I'd like that "instance" will be the ip address and port of the running service.
It is worth mentioning I used honor_labels: true
in the Promethoues conf.
How can I set (automatically if possible) the instance tag?
Thanks