From: Patrick Seidensal Date: Tue, 27 Jul 2021 13:18:46 +0000 (+0200) Subject: mgr/prometheus: Fix metric types from gauge to counter X-Git-Tag: v16.2.8~294^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F43187%2Fhead;p=ceph.git mgr/prometheus: Fix metric types from gauge to counter Affected metrics: - ceph_pool_rd - ceph_pool_rd_bytes - ceph_pool_rw - ceph_pool_rw_bytes Fixes: https://tracker.ceph.com/issues/51868 Signed-off-by: Patrick Seidensal (cherry picked from commit ede63b2eff23d824425da69ed304049c1c232ffd) --- diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index c8b7a5302e53b..2b689fdf23cb9 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -475,7 +475,7 @@ class Module(MgrModule): for state in DF_POOL: path = 'pool_{}'.format(state) metrics[path] = Metric( - 'gauge', + 'counter' if state in ('rd', 'rd_bytes', 'wr', 'wr_bytes') else 'gauge', path, 'DF pool {}'.format(state), ('pool_id',)