changeset 4545:f4ab80f72d63

mod_prometheus: Update readme with "manual" statistics interval
author Jonas Schäfer <jonas@wielicki.name>
date Sun, 18 Apr 2021 14:00:10 +0200
parents 64fa2dd34d43
children cfe196f88e96
files mod_prometheus/README.markdown
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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
 =============