From 431ee696201430b027234e32b654775ef9f58406 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 27 Dec 2023 10:03:00 -0500 Subject: [PATCH] Use proper percentage for pool util --- daemon-common/cluster.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon-common/cluster.py b/daemon-common/cluster.py index 6d637cd1..e3ae7923 100644 --- a/daemon-common/cluster.py +++ b/daemon-common/cluster.py @@ -1629,11 +1629,11 @@ def get_resource_metrics(zkhandler): output_lines.append("# TYPE pvc_ceph_pool_used_percent gauge") for pool in pool_data: try: - pool_used_percent = pool["stats"]["used_percent"] + pool_used_percent = pool["stats"]["used_percent"] * 100 except Exception: continue output_lines.append( - f"pvc_ceph_pool_used_percent{{pool=\"{pool['name']}\"}} {pool_used_percent}" + f"pvc_ceph_pool_used_percent{{pool=\"{pool['name']}\"}} {pool_used_percent:2.2f}" ) output_lines.append("# HELP pvc_ceph_pool_num_objects PVC Pool total objects")