]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/prometheus: replace whitespaces in metrics' names
authoralfonsomthd <almartin@redhat.com>
Tue, 23 Apr 2019 14:20:47 +0000 (16:20 +0200)
committeralfonsomthd <almartin@redhat.com>
Tue, 23 Apr 2019 14:20:47 +0000 (16:20 +0200)
Fixes: https://tracker.ceph.com/issues/39434
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
src/pybind/mgr/prometheus/module.py

index 90ef3c6b8a7fbb4af2e988506ecdd307087a1723..4a81fce65ec97f70acf8bd2804cb6e3c31ed935f 100644 (file)
@@ -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