# HG changeset patch # User Jonas Schäfer # Date 1618747210 -7200 # Node ID f4ab80f72d637425dbc4b2a1a119bc1f0c1e7b6c # Parent 64fa2dd34d43baebd976ef69cfc1a7f2856a7f22 mod_prometheus: Update readme with "manual" statistics interval diff -r 64fa2dd34d43 -r f4ab80f72d63 mod_prometheus/README.markdown --- a/mod_prometheus/README.markdown Sun Apr 18 13:42:07 2021 +0200 +++ b/mod_prometheus/README.markdown Sun Apr 18 14:00:10 2021 +0200 @@ -22,7 +22,7 @@ requires Prosody’s [internal statistics provider](https://prosody.im/doc/statistics#built-in_providers) to be enabled. You may also want to change the default collection interval -to the one your statistics consumer is using. +to the one your statistics consumer is using. See below for more information. ```lua statistics = "internal" @@ -40,6 +40,20 @@ protocol that is how you can customise its URL. The default one being http://localhost:5280/metrics +Scrape interval vs statistics_interval +-------------------------------------- + +The `statistics_interval` should be set to `"manual"` on trunk if and only +if you have a single Prometheus instance scraping Prosody. This will allow +the internal statistics gathering to run optimally. + +If you have multiple instances scraping Prosody, set `statistics_interval` +to the scrape interval of Prometheus to avoid errors in rate calculations +and similar. + +Future work will allow the use of `"manual"` with multiple Prometheus +instances and varying scrape intervals (stay tuned). + Compatibility =============