]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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>
Tue, 3 Apr 2018 16:35:14 +0000 (18:35 +0200)
commitcf5cf17a3a6ed552620ba0dfcf18e9e7ce015af1
tree6906c2205d2b6ba8e4882748ae6ff8ebe8803ca4
parent5bce4bf1db589d8b964e54cf684a9b90149ad883
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