From 64234ba161bac76359cb5c7b14c0cb165dea6dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20BERSAC?= Date: Tue, 11 Jun 2024 10:29:36 +0200 Subject: [PATCH] agent: Accept MB unit setting --- agent/temboardagent/discover.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/agent/temboardagent/discover.py b/agent/temboardagent/discover.py index 79466bc68..d1e2c6a2d 100644 --- a/agent/temboardagent/discover.py +++ b/agent/temboardagent/discover.py @@ -188,6 +188,8 @@ def collect_postgres(data, conn): pass elif '8kB' == u: v = v * 8 * 1024 + elif 'MB' == u: + v = v * 1024 * 1024 else: raise ValueError("Unsupported unit %s" % u) data['postgres'][row['name']] = v