mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-04-08 02:01:23 +00:00
Merge pull request #6 from marcusmartins/duration_handling
Handle `pg_runtime_variable` return values
This commit is contained in:
commit
9cdd620449
@ -288,6 +288,10 @@ func makeDescMap(metricMaps map[string]map[string]ColumnMapping) map[string]Metr
|
||||
return math.NaN(), false
|
||||
}
|
||||
|
||||
if durationString == "-1" {
|
||||
return math.NaN(), false
|
||||
}
|
||||
|
||||
d, err := time.ParseDuration(durationString)
|
||||
if err != nil {
|
||||
log.Errorln("Failed converting result to metric:", columnName, in, err)
|
||||
|
Loading…
Reference in New Issue
Block a user