]> 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, 1 Nov 2017 23:03:24 +0000 (23:03 +0000)
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>
(cherry picked from commit eb524c272c89f8f99f22969b78caa016db7c671e)

src/pybind/mgr/prometheus/module.py

index 1ab41395ecf0b55c17a9326c3d1fd9768d0754d2..a7efbfc7fde16fe44ba8e9c4be8e6353c2e80545 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