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: v17.1.0~1240^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42506%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 --- diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index bc6c4eed2b98..b99aeb752dee 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -481,7 +481,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',)