On Thursday, 5 March 2020 17:20:01 UTC, Danny de Waard wrote:
>
> I have been reading all across the internet for a way to relabel my 
> instance name.
> Now all my dashboard have long instance names like lsrv1.server.nl:9100
>
> I would like to have that reduced to lsrv1
>

The blog post at 
https://www.robustperception.io/controlling-the-instance-label describes 
this - at least, getting rid of the port.

You can also make the instance label a short name "lsrv1" whilst scraping 
target with DNS name "lsrv1.server.nl" or IP address "1.2.3.4". To do this, 
make a target which contains both parts, e.g. "name/address", and use 
relabelling to splitting the name into the "instance" label and the 
address:port into the "__address__" label.  See:
https://groups.google.com/d/msg/prometheus-users/VafEFQQKdWc/YrChiAePBQAJ
https://github.com/candlerb/netbox-prometheus#targets

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/486df08e-e4b0-437e-bf4e-f9bceba5d288%40googlegroups.com.

Reply via email to