From 5452a3aac633fc331513398a862db863b10277bc Mon Sep 17 00:00:00 2001 From: Greg Stark Date: Sat, 6 Oct 2018 13:08:04 -0400 Subject: [PATCH] Postgres commits 6e7baa3227 and b06d8e58b5 added a new unit suffix "B" for memory parameters for bytes. --- cmd/postgres_exporter/pg_setting.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/postgres_exporter/pg_setting.go b/cmd/postgres_exporter/pg_setting.go index efb60b1d..a867a885 100644 --- a/cmd/postgres_exporter/pg_setting.go +++ b/cmd/postgres_exporter/pg_setting.go @@ -96,7 +96,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", "16kB", "32kB", "16MB", "32MB", "64MB": + case "B", "kB", "MB", "GB", "TB", "8kB", "16kB", "32kB", "16MB", "32MB", "64MB": unit = "bytes" default: err = fmt.Errorf("Unknown unit for runtime variable: %q", s.unit)