Software /
code /
prosody-modules
Comparison
mod_prometheus/README.markdown @ 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 |
parent | 4239:313e293f44b3 |
child | 4790:bb66e87a3604 |
comparison
equal
deleted
inserted
replaced
4544:64fa2dd34d43 | 4545:f4ab80f72d63 |
---|---|
20 | 20 |
21 mod\_prometheus itself doesn’t have any configuration option, but it | 21 mod\_prometheus itself doesn’t have any configuration option, but it |
22 requires Prosody’s [internal statistics | 22 requires Prosody’s [internal statistics |
23 provider](https://prosody.im/doc/statistics#built-in_providers) to be | 23 provider](https://prosody.im/doc/statistics#built-in_providers) to be |
24 enabled. You may also want to change the default collection interval | 24 enabled. You may also want to change the default collection interval |
25 to the one your statistics consumer is using. | 25 to the one your statistics consumer is using. See below for more information. |
26 | 26 |
27 ```lua | 27 ```lua |
28 statistics = "internal" | 28 statistics = "internal" |
29 statistics_interval = 15 -- in seconds | 29 statistics_interval = 15 -- in seconds |
30 ``` | 30 ``` |
38 See also the documentation of Prosody’s [HTTP | 38 See also the documentation of Prosody’s [HTTP |
39 server](https://prosody.im/doc/http), since Prometheus is an HTTP | 39 server](https://prosody.im/doc/http), since Prometheus is an HTTP |
40 protocol that is how you can customise its URL. The default one being | 40 protocol that is how you can customise its URL. The default one being |
41 http://localhost:5280/metrics | 41 http://localhost:5280/metrics |
42 | 42 |
43 Scrape interval vs statistics_interval | |
44 -------------------------------------- | |
45 | |
46 The `statistics_interval` should be set to `"manual"` on trunk if and only | |
47 if you have a single Prometheus instance scraping Prosody. This will allow | |
48 the internal statistics gathering to run optimally. | |
49 | |
50 If you have multiple instances scraping Prosody, set `statistics_interval` | |
51 to the scrape interval of Prometheus to avoid errors in rate calculations | |
52 and similar. | |
53 | |
54 Future work will allow the use of `"manual"` with multiple Prometheus | |
55 instances and varying scrape intervals (stay tuned). | |
56 | |
43 Compatibility | 57 Compatibility |
44 ============= | 58 ============= |
45 | 59 |
46 ------- ------------- | 60 ------- ------------- |
47 trunk Works | 61 trunk Works |