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 <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2021-02-02 21:36:18 +08:00
parent f6b18055ab
commit c8e5a051a0
2 changed files with 2 additions and 2 deletions

View 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

View File

@ -2425,7 +2425,7 @@
<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>