justwatchcom / sql_exporter

Flexible SQL Exporter for Prometheus.
MIT License
402 stars 109 forks source link

Add synchronous jobs #131

Open mbanck-ntap opened 4 months ago

mbanck-ntap commented 4 months ago

We needed a possibility to execute some jobs / queries synchronously every time /metrics is requested. So I added the infrastructure to execute jobs with an interval <= 0 synchronously when the http-handler is called.

interval: '0s' # an interval <= 0 will make the queries synchronous

This is a rebase and re-submission from #10 which erroneously got marked as merged a while ago.