openldap_exporter
openldap_exporter copied to clipboard
provide a option to collect metrics upon scrape rather than collecting it periodcally
https://prometheus.io/docs/instrumenting/writing_exporters/#scheduling exposing metrics using internal scheduling is anti-pattern in prometheus, if we collect metrics when each scrape came in , these are the advantages:
- the default
upmetrics can be used to indicate whether the scrape is a success or a failure. - the scrape frequency can be controlled by prometheus rather than the prometheus and exporter
- no hidden outdated data, if the exporter scrape data in backgroud , there is a chance that prometheus get outdated data, the metrics would
there might be disadvantage: if collection of metrics is expensive, like it takes a minute or more to complete, this could be a problem, in which case, a pushgateway may be more suitable.