Software / code / prosody-modules
Comparison
mod_stats39/README.markdown @ 3844:c240934703bc
mod_stats39: Add a README
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 19 Jan 2020 14:55:36 +0100 |
| child | 3845:117f0fb8cb15 |
comparison
equal
deleted
inserted
replaced
| 3843:c065b7670c89 | 3844:c240934703bc |
|---|---|
| 1 This module provides **public** access to Prosodys | |
| 2 [internal statistics][doc:statistics] trough the | |
| 3 [XEP-0039: Statistics Gathering] protocol. This is a simple protocol | |
| 4 that returns triplets of name, unit and value for each know statistic | |
| 5 collected by Prosody. The names used are the internal names assigned by | |
| 6 modules or statsmanager, names from the registry are **not** used. | |
| 7 | |
| 8 # Configuration | |
| 9 | |
| 10 Enabled as usual by adding to [`modules_enabled`][doc:modules_enabled]: | |
| 11 | |
| 12 ```lua | |
| 13 -- Enable Prosodys internal statistics gathering | |
| 14 statistics = "internal" | |
| 15 | |
| 16 -- and enable the module | |
| 17 modules_enabled = { | |
| 18 -- other modules | |
| 19 "stats39"; | |
| 20 } | |
| 21 ``` | |
| 22 | |
| 23 # Usage | |
| 24 | |
| 25 | |
| 26 ## Example | |
| 27 | |
| 28 Statistics can be queried from the XML console of clients that have one: | |
| 29 | |
| 30 ```xml | |
| 31 C: | |
| 32 <iq type="get" to="example.com" id="dTMERjt5"> | |
| 33 <query xmlns="http://jabber.org/protocol/stats"/> | |
| 34 </iq> | |
| 35 | |
| 36 S: | |
| 37 <iq type="result" to="example.com" id="dTMERjt5"> | |
| 38 <query xmlns="http://jabber.org/protocol/stats"> | |
| 39 </query> | |
| 40 </iq> | |
| 41 ``` | |
| 42 |