]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/prometheus: Fix pg_* counts
authorBoris Ranto <branto@redhat.com>
Fri, 16 Feb 2018 17:45:58 +0000 (18:45 +0100)
committerBoris Ranto <branto@redhat.com>
Mon, 19 Feb 2018 16:30:46 +0000 (17:30 +0100)
commit6cefd4832f59b6196f27769a1ec4934329547da9
tree181fcf8ccf03227f084c3779ccad320c8ceb25f0
parent965aaad5273eac311e4535559a0e0a9df8a39bee
mgr/prometheus: Fix pg_* counts

Currently, the pg_* counts are not computed properly. We split the
current state by '+' sign but do not add the pg count to the already
found pg count. Instead, we overwrite any existing pg count with the new
count. This patch fixes it by adding all the pg counts together for all
the states.

It also introduces a new pg_total metric for pg_total that shows the
total count of PGs.

Signed-off-by: Boris Ranto <branto@redhat.com>
src/pybind/mgr/prometheus/module.py