]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/prometheus: Fix metric types from gauge to counter 43187/head
authorPatrick Seidensal <pseidensal@suse.com>
Tue, 27 Jul 2021 13:18:46 +0000 (15:18 +0200)
committerAvan Thakkar <athakkar@localhost.localdomain>
Thu, 16 Sep 2021 10:19:25 +0000 (15:49 +0530)
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 <pseidensal@suse.com>
(cherry picked from commit ede63b2eff23d824425da69ed304049c1c232ffd)

src/pybind/mgr/prometheus/module.py

index c8b7a5302e53b865f08e5c2535a87ab67abafb6c..2b689fdf23cb9a25faa5f78f2ad289a250f4260d 100644 (file)
@@ -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',)