I enabled %s.stats in my nsd configuration to get metrics per zone, but one of my zones contains a - which is a forbidden character in prometheus. Is there a way to configure nsd_exporter to parse these "forbidden" characters, and the issue is solved by renaming metrics in prometheus scrape configs.
thanks for the answer in advance
cli error message:
panic: descriptor Desc{fqName: "nsd_xn--d1alf_stats_num_udp", help: "number of queries on xn--d1alf over UDP ip4.", constLabels: {}, variableLabels: []} is invalid: "nsd_xn--d1alf_stats_num_udp" is not a valid metric name
I enabled %s.stats in my nsd configuration to get metrics per zone, but one of my zones contains a - which is a forbidden character in prometheus. Is there a way to configure nsd_exporter to parse these "forbidden" characters, and the issue is solved by renaming metrics in prometheus scrape configs. thanks for the answer in advance
cli error message:
panic: descriptor Desc{fqName: "nsd_xn--d1alf_stats_num_udp", help: "number of queries on xn--d1alf over UDP ip4.", constLabels: {}, variableLabels: []} is invalid: "nsd_xn--d1alf_stats_num_udp" is not a valid metric name
goroutine 1 [running]: github.com/prometheus/client_golang/prometheus.(*Registry).MustRegister(0xc000088550, 0xc0001ddc10, 0x1, 0x1) /go/pkg/mod/github.com/prometheus/client_golang@v1.4.0/prometheus/registry.go:400 +0xb7 github.com/prometheus/client_golang/prometheus.MustRegister(...) /go/pkg/mod/github.com/prometheus/client_golang@v1.4.0/prometheus/registry.go:177 main.main() /drone/src/nsd_exporter.go:250 +0x226