]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/prometheus: add Prometheus metric collector
authorDan Mick <dan.mick@redhat.com>
Wed, 12 Jul 2017 05:30:05 +0000 (22:30 -0700)
committerDan Mick <dan.mick@redhat.com>
Wed, 19 Jul 2017 21:47:19 +0000 (14:47 -0700)
commit24a161129a8592b1cdcdbdf09097b47b53312c75
tree89e43516957c349173026fd2d6130b9319417f69
parentf0e9dcda0c1c0cdd5616560ea6814ba523fd67ae
pybind/mgr/prometheus: add Prometheus metric collector

This implements a Prometheus 'text' endpoint with cherrypy.
All paths return the metrics (as the Prometheus project's
Python client server does).

1) the newest stat is used for all counters/gauges
2) histograms are not handled
3) the timestamp assigned by Prometheus is the time of query, not
   the time collected by Ceph (long story), but this is now
   easily changed if necessary (by adding the timestamp in ms to
   the end of each reporting line, in Go float format).

Signed-off-by: Dan Mick <dan.mick@redhat.com>
src/pybind/mgr/prometheus/__init__.py [new file with mode: 0644]
src/pybind/mgr/prometheus/module.py [new file with mode: 0644]