From 843802f43eaa8d0117dd2585b19ac71add3f1024 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 --- 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 90ef3c6b8a7..4a81fce65ec 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -122,7 +122,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.39.5