The server name will be added by Prometheus itself as an "instance" label for each target being scraped (or you can manually set the instance label for each target), so in general what you're asking is not necessary. None of the standard Prometheus exporters include a label for the hostname (e.g. node_exporter, windows_exporter etc).
If there's something special about your situation which means you need to do this, can you explain your use case further? On Wednesday 6 March 2024 at 10:40:29 UTC cpu...@gmail.com wrote: > The Go runtime exposes various metrics. To collect metrics from multiple > servers I'd like to add labels for server name. Is it possible to extend > the build-in metrics for this purpose? > > Thanks, > Andi > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/fba0add8-7b74-4546-99b0-70a22230647en%40googlegroups.com.