From: alfonsomthd Date: Tue, 23 Apr 2019 14:20:47 +0000 (+0200) Subject: mgr/prometheus: replace whitespaces in metrics' names X-Git-Tag: v15.1.0~2855^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F27722%2Fhead;p=ceph.git mgr/prometheus: replace whitespaces in metrics' names Fixes: https://tracker.ceph.com/issues/39434 Signed-off-by: Alfonso Martínez --- diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index 90ef3c6b8a7f..4a81fce65ec9 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