]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
pybind/mgr/prometheus: add Metrics class to manage Metric instances
authorJan Fajerski <jfajerski@suse.com>
Sat, 17 Feb 2018 11:07:46 +0000 (12:07 +0100)
committerJan Fajerski <jfajerski@suse.com>
Thu, 1 Mar 2018 07:43:09 +0000 (08:43 +0100)
commitf88877ab0bd895d8b67222225c22a12d479b7548
tree0dcd64e7b965740c3920cd7510b5d933c0e7dce7
parent59da11b195dce6709b101b84916d18ede7c01e76
pybind/mgr/prometheus: add Metrics class to manage Metric instances

The central change of this commit is that per-daemon metrics are now
managed by first appending the metric (using Metrics.append) to a
staging area. Then the metrics for specific paths (metric names) are
overwritten by the staged metrics (by calling Metrics.reset). This gets
rid of metrics from daemon that are no longer in the cluster. I.e. when
ceph no longer reports metrics for one OSD daemon (because it was
removed from the cluster) the prometheus module will no longer export
metrics for that daemon.

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
src/pybind/mgr/prometheus/module.py