]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/prometheus: replace whitespaces in metrics' names 27886/head
authoralfonsomthd <almartin@redhat.com>
Tue, 23 Apr 2019 14:20:47 +0000 (16:20 +0200)
committeralfonsomthd <almartin@redhat.com>
Tue, 30 Apr 2019 10:39:57 +0000 (12:39 +0200)
Fixes: https://tracker.ceph.com/issues/39434
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
(cherry picked from commit 843802f43eaa8d0117dd2585b19ac71add3f1024)

src/pybind/mgr/prometheus/module.py

index b7fecf8d85a9a64fc9734d82468f92e8bd1ed637..0f95331f587e75a8ad82520b9dfc7d6b06b74d52 100644 (file)
@@ -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