]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
prometheus: Fix metric resets
authorBoris Ranto <branto@redhat.com>
Wed, 27 Jun 2018 07:50:04 +0000 (09:50 +0200)
committerBoris Ranto <branto@redhat.com>
Tue, 17 Jul 2018 20:28:59 +0000 (22:28 +0200)
commitf6c4db8c11471c8c11e387d37833c2b49872b725
treeca0c2aed9615444b3f6a979c07875f6c888fa2d2
parent326fdd94c916202dd7ca8680d6d271b3d7599b50
prometheus: Fix metric resets

This patch changes the way we reset metrics when collecting data in the
prometheus exporter module. With this patch, the exported metrics at any
point in time should align with a freshly started ceph-mgr module.

The patch also introduces locking mechanism to serialize the requests
and to avoid overwriting the metrics during multiple scrapes happenning
at the same time.

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