From: John Spray Date: Mon, 4 Sep 2017 09:39:11 +0000 (-0400) Subject: mgr/prometheus: tag stats by daemon name X-Git-Tag: v13.0.1~707^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=eb524c272c89f8f99f22969b78caa016db7c671e;p=ceph.git mgr/prometheus: tag stats by daemon name 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 --- diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index b0c3dab481f..3d7ec32c741 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -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