]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/prometheus: Fix metric types from gauge to counter 42674/head
authorPatrick Seidensal <pseidensal@suse.com>
Tue, 27 Jul 2021 13:18:46 +0000 (15:18 +0200)
committerLaura Paduano <lpaduano@suse.com>
Thu, 5 Aug 2021 10:22:46 +0000 (12:22 +0200)
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 d1b89495d83daa6a9ff44764a0fb1e3b012f3d73..c150b11efa53c979185cb8bd19df7a8465704774 100644 (file)
@@ -441,7 +441,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',)