From: Kefu Chai Date: Tue, 2 Feb 2021 13:36:18 +0000 (+0800) Subject: mgr/zabbix: format ceph.[{#POOL},percent_used as float X-Git-Tag: v17.1.0~3090^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c8e5a051a016fa29a621ef021f942d9dac97205a;p=ceph.git mgr/zabbix: format ceph.[{#POOL},percent_used as float 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 --- diff --git a/src/pybind/mgr/zabbix/module.py b/src/pybind/mgr/zabbix/module.py index b3b27c784904..0dd34953072d 100644 --- a/src/pybind/mgr/zabbix/module.py +++ b/src/pybind/mgr/zabbix/module.py @@ -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 diff --git a/src/pybind/mgr/zabbix/zabbix_template.xml b/src/pybind/mgr/zabbix/zabbix_template.xml index ab0e200db2b6..3b933bcf32ec 100644 --- a/src/pybind/mgr/zabbix/zabbix_template.xml +++ b/src/pybind/mgr/zabbix/zabbix_template.xml @@ -2425,7 +2425,7 @@ 90 365 0 - 3 + 0 % 0