From c8e5a051a016fa29a621ef021f942d9dac97205a Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 2 Feb 2021 21:36:18 +0800 Subject: [PATCH] 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 --- src/pybind/mgr/zabbix/module.py | 2 +- src/pybind/mgr/zabbix/zabbix_template.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/zabbix/module.py b/src/pybind/mgr/zabbix/module.py index b3b27c78490..0dd34953072 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 ab0e200db2b..3b933bcf32e 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 -- 2.39.5