From 78ed438eb9f4589afcae8312d2beed114d7fc98d Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Mon, 9 Nov 2020 08:48:29 -0600 Subject: [PATCH] Don't include bedrock server version when ping fails via prometheus export --- prom_collector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prom_collector.go b/prom_collector.go index af05078..5f48f06 100644 --- a/prom_collector.go +++ b/prom_collector.go @@ -156,7 +156,7 @@ func (c *promBedrockCollector) Collect(metrics chan<- prometheus.Metric) { info, err := PingBedrockServer(net.JoinHostPort(c.host, c.port)) if err != nil { - c.sendMetric(metrics, promDescHealthy, info.Version, 0) + c.sendMetric(metrics, promDescHealthy, "", 0) } else { c.sendMetric(metrics, promDescResponseTime, info.Version, info.Rtt.Seconds()) c.sendMetric(metrics, promDescHealthy, info.Version, 1)