Happy New Year. The Python client examples I've been able to find all, including the one here <https://github.com/prometheus/client_python>, 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,? I notice that the HTTP server included ignores the URI of the request and returns the metrics regardless. e.g. This works just fine: http://localhost:8000/foo?doesntmatter=anything 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 <https://prometheus.io/docs/guides/multi-target-exporter/>? 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. -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/9ab2a249-7a5d-4858-a225-05eac8daa6e1n%40googlegroups.com.

