From e9e11cd9812c2ec5b40d587967c6efa5cfafa8bc Mon Sep 17 00:00:00 2001 From: alfonsomthd Date: Tue, 23 Apr 2019 16:20:47 +0200 Subject: [PATCH] mgr/prometheus: replace whitespaces in metrics' names MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: https://tracker.ceph.com/issues/39434 Signed-off-by: Alfonso Martínez (cherry picked from commit 843802f43eaa8d0117dd2585b19ac71add3f1024) --- src/pybind/mgr/prometheus/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index b7fecf8d85a9..0f95331f587e 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -121,7 +121,7 @@ class Metric(object): def promethize(path): ''' replace illegal metric name characters ''' result = path.replace('.', '_').replace( - '+', '_plus').replace('::', '_') + '+', '_plus').replace('::', '_').replace(' ', '_') # Hyphens usually turn into underscores, unless they are # trailing -- 2.47.3