Happy New Year.
The Python client examples I've been able to find all, including the one
here, start the HTTP server on the side, and run the metric-generating function in a loop regardless of whether, or at what frequency, prometheus is scraping that metric.
1 - With this client, is it possible, and is anyone aware of a simple example, of only executing the metric-generating function when a scrape comes in from prometheus,?
2 - Similarly is it possible/available Python example, of using the included HTTP server but parsing HTTP parameters that come in from prometheus in order to write a multi-target exporter like described
here?
Ultimate goal is to be able to write a blackbox-style exporter for anything where a metric can be pulled by some Python code. e.g. Obscure appliances/metrics for which there is no easier answer like SNMP or existing Blackbox modules.
Thanks.