]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: prometheus: set metadata metrics value to '1' (#22717). 20254/head
authorKonstantin Shalygin <k0ste@k0ste.ru>
Wed, 17 Jan 2018 06:23:46 +0000 (13:23 +0700)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Fri, 2 Feb 2018 06:22:46 +0000 (13:22 +0700)
Signed-off-by: Konstantin Shalygin <k0ste@k0ste.ru>
src/pybind/mgr/prometheus/module.py

index b7e5031d8ec79094c44dc30043c713d22e4f46cd..0da635b5572d9334091afd4c989cc4950afcee26 100644 (file)
@@ -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()