]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/zabbix: format ceph.[{#POOL},percent_used as float 39227/head
authorKefu Chai <kchai@redhat.com>
Tue, 2 Feb 2021 13:36:18 +0000 (21:36 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 2 Feb 2021 13:39:57 +0000 (21:39 +0800)
also, multiply it with 100, as we are using 1.0 for 100% here.

for more details regarding the mapping from value_type to its values.
see
https://www.zabbix.com/documentation/4.0/manual/api/reference/item/object

Fixes: https://tracker.ceph.com/issues/48825
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/zabbix/module.py
src/pybind/mgr/zabbix/zabbix_template.xml

index b3b27c784904c3a095d1347d2d0e584b61742f3a..0dd34953072d6e4762c07cb7cc43e5f9f2e8e707 100644 (file)
@@ -227,7 +227,7 @@ class Module(MgrModule):
             data['[{0},wr_ops]'.format(pool['name'])] = pool['stats']['wr']
             data['[{0},bytes_used]'.format(pool['name'])] = pool['stats']['bytes_used']
             data['[{0},stored_raw]'.format(pool['name'])] = pool['stats']['stored_raw']
-            data['[{0},percent_used]'.format(pool['name'])] = pool['stats']['percent_used']
+            data['[{0},percent_used]'.format(pool['name'])] = pool['stats']['percent_used'] * 100
 
         data['wr_ops'] = wr_ops
         data['rd_ops'] = rd_ops
index ab0e200db2b6ee7063e3cdd580bf0bbb9105cda0..3b933bcf32ec2851914c21b32845e01a36844f11 100644 (file)
                             <history>90</history>
                             <trends>365</trends>
                             <status>0</status>
-                            <value_type>3</value_type>
+                            <value_type>0</value_type>
                             <allowed_hosts/>
                             <units>%</units>
                             <delta>0</delta>