I am prometheus deployment and my instance
label showing ipaddress instead of hostname.
node_cpu_seconds_total{cpu="0", instance="10.0.28.11:9100", job="node", mode="idle"}
I want to change instance with hostname like following example
node_cpu_seconds_total{cpu="0", instance="server1:9100", job="node", mode="idle"}
I am using following method to replace label but I have 100s of nodes and that is not a best way. does prometheus has better way to replace instance ip with hostname?
- job_name: node
static_configs:
- targets:
- server1:9100
- server2:9100