From: John Spray Date: Mon, 4 Sep 2017 09:39:11 +0000 (-0400) Subject: mgr/prometheus: tag stats by daemon name X-Git-Tag: v12.2.2~61^2~66 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3bd478794e2626251eda91850974188da208b591;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 (cherry picked from commit eb524c272c89f8f99f22969b78caa016db7c671e) --- diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index 1ab41395ecf0..a7efbfc7fde1 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