You've already forked postgres_exporter
mirror of
https://github.com/prometheus-community/postgres_exporter.git
synced 2025-11-09 05:00:59 +03:00
@@ -94,7 +94,7 @@ func (s *pgSetting) normaliseUnit() (val float64, unit string, err error) {
|
||||
return
|
||||
case "ms", "s", "min", "h", "d":
|
||||
unit = "seconds"
|
||||
case "kB", "MB", "GB", "TB", "8kB", "16MB":
|
||||
case "kB", "MB", "GB", "TB", "8kB", "16kB", "16MB":
|
||||
unit = "bytes"
|
||||
default:
|
||||
err = fmt.Errorf("Unknown unit for runtime variable: %q", s.unit)
|
||||
@@ -125,6 +125,8 @@ func (s *pgSetting) normaliseUnit() (val float64, unit string, err error) {
|
||||
val *= math.Pow(2, 40)
|
||||
case "8kB":
|
||||
val *= math.Pow(2, 13)
|
||||
case "16kB":
|
||||
val *= math.Pow(2, 14)
|
||||
case "16MB":
|
||||
val *= math.Pow(2, 24)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user