We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4191c1a commit ddf582dCopy full SHA for ddf582d
postgres_exporter.go
@@ -348,8 +348,9 @@ func (e *Exporter) scrape(ch chan<- prometheus.Metric) {
348
349
// Get the label values for this row
350
var labels = make([]string, len(mapping.labels))
351
- for i, n := range labels {
352
- labels[i], _ = dbToString(columnData[columnIdx[n]])
+ for idx, columnName := range mapping.labels {
+
353
+ labels[idx], _ = dbToString(columnData[columnIdx[columnName]])
354
}
355
356
// Loop over column names, and match to scan data. Unknown columns
0 commit comments