Open jerith opened 7 years ago
I don't mind taking a stab at implementing this myself, but it'll probably be a while before I have the time for it.
It presents an interesting queuing/aggregation challenge if you can't guarantee how frequently Prometheus checks in.
We'd basically just cache the most recent value from any metric and serve that when Prometheus comes by to check.
(Ideally, we'd only actually run the source collectors when Prometheus queries us, but that's rather more of a challenge from an architectural standpoint.)
This output would be a bit different, because Prometheus scrapes metrics over HTTP instead of having metrics pushed to it.
https://prometheus.io/docs/instrumenting/exposition_formats/ and https://prometheus.io/docs/instrumenting/writing_exporters/ document the metrics formats and best practices.