]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/prometheus: replace whitespaces in metrics' names 28165/head
authoralfonsomthd <almartin@redhat.com>
Tue, 23 Apr 2019 14:20:47 +0000 (16:20 +0200)
committerPrashant D <pdhange@redhat.com>
Sun, 19 May 2019 23:27:06 +0000 (19:27 -0400)
Fixes: https://tracker.ceph.com/issues/39434
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
(cherry picked from commit 843802f43eaa8d0117dd2585b19ac71add3f1024)

Conflicts:
src/pybind/mgr/prometheus/module.py : Resolved in promethize

src/pybind/mgr/prometheus/module.py

index 2d4472434a0795bf057bd4a207d85c7fe6ab4c50..f27b223508bd895053f4b4c2cd3900e5bd95c16b 100644 (file)
@@ -142,7 +142,8 @@ class Metric(object):
 
         def promethize(path):
             ''' replace illegal metric name characters '''
-            result = path.replace('.', '_').replace('+', '_plus').replace('::', '_')
+            result = path.replace('.', '_').replace(
+                '+', '_plus').replace('::', '_').replace(' ', '_')
 
             # Hyphens usually turn into underscores, unless they are
             # trailing