]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/prometheus: tag stats by daemon name
authorJohn Spray <john.spray@redhat.com>
Mon, 4 Sep 2017 09:39:11 +0000 (05:39 -0400)
committerJohn Spray <john.spray@redhat.com>
Wed, 27 Sep 2017 18:20:20 +0000 (14:20 -0400)
Using osd=0 or similar tags was problematic because
daemons of different types have some same-named
counters (e.g. MDS and OSD both have objecter
perf counters).

Signed-off-by: John Spray <john.spray@redhat.com>
src/pybind/mgr/prometheus/module.py

index b0c3dab481f1dcd5e23f16863d01998c31828fcf..3d7ec32c741193c5747ad37d3450bbce6d18b4e7 100644 (file)
@@ -373,20 +373,17 @@ class Module(MgrModule):
                     self.log.debug('ignoring %s, type %s' % (path, stattype))
                     continue
 
-                daemon_type, daemon_id = daemon.split('.')
-
                 if path not in self.metrics:
                     self.metrics[path] = Metric(
                         stattype,
                         path,
                         counter_info['description'],
-                        (daemon_type,),
+                        ("ceph_daemon",),
                     )
 
-                self.log.debug("set {0}".format(path))
                 self.metrics[path].set(
                     counter_info['value'],
-                    (daemon_id,)
+                    (daemon,)
                 )
 
         return self.metrics