From c03fb497d5b3353e5825a17289f86cd5a30e3a62 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 14 Mar 2020 15:12:01 -0400 Subject: [PATCH] use strKey --- exporter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporter.go b/exporter.go index da1cbf4d..19535eb3 100644 --- a/exporter.go +++ b/exporter.go @@ -650,7 +650,7 @@ func (e *Exporter) extractConfigMetrics(ch chan<- prometheus.Metric, config []st } if val, err := strconv.ParseFloat(strVal, 64); err == nil { - e.registerConstMetricGauge(ch, fmt.Sprintf("config_%s", config[pos*2]), val) + e.registerConstMetricGauge(ch, fmt.Sprintf("config_%s", strKey), val) } } return