From: Konstantin Shalygin Date: Wed, 17 Jan 2018 06:23:46 +0000 (+0700) Subject: mgr: prometheus: set metadata metrics value to '1' (#22717). X-Git-Tag: v12.2.5~78^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=caeb6c80ef39bbbc74297812de08c2d25934532c;p=ceph.git mgr: prometheus: set metadata metrics value to '1' (#22717). Signed-off-by: Konstantin Shalygin --- diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index b7e5031d8ec7..0da635b5572d 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -305,7 +305,7 @@ class Module(MgrModule): p_addr = osd['public_addr'].split(':')[0] c_addr = osd['cluster_addr'].split(':')[0] dev_class = next((osd for osd in osd_devices if osd['id'] == id_)) - self.metrics['osd_metadata'].set(0, ( + self.metrics['osd_metadata'].set(1, ( c_addr, dev_class['class'], id_, @@ -329,7 +329,7 @@ class Module(MgrModule): if osd_dev_node and osd_hostname: self.log.debug("Got dev for osd {0}: {1}/{2}".format( id_, osd_hostname, osd_dev_node)) - self.metrics['disk_occupation'].set(0, ( + self.metrics['disk_occupation'].set(1, ( osd_hostname, osd_dev_node, "osd.{0}".format(id_) @@ -341,7 +341,7 @@ class Module(MgrModule): for pool in osd_map['pools']: id_ = pool['pool'] name = pool['pool_name'] - self.metrics['pool_metadata'].set(0, (id_, name)) + self.metrics['pool_metadata'].set(1, (id_, name)) def collect(self): self.get_health()