Mercurial > prosody-modules
annotate mod_http_status/README.md @ 5951:d6a695abb33c
mod_ping_muc: Delay ping a configurable amount of time
If a server is restarting, checking immediately before it has a chance
to complete its restart and get ready would often fail, preventing the
possibility of transparent restarts as supported by Prosody's mod_muc.
Reconnecting immediately when a connection is closed for being idle, or
because the remote server is trying to reclaim some resources, is also
counter-productive as the connection may fail.
Also, if there is some Internet routing problem affecting s2s, it may
help to wait a bit before checking, in case the problem resolved itself
in the mean time.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 11 Aug 2024 16:10:24 +0200 |
parents | e274431bf4ce |
children |
rev | line source |
---|---|
5161
6af2d74daa15
mod_http_status: Report module statuses
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 Prosody 0.12 added an API allowing modules to report their status. This |
6af2d74daa15
mod_http_status: Report module statuses
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 module allows reading these statuses via HTTP for use in monitoring. |
6af2d74daa15
mod_http_status: Report module statuses
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 |
6af2d74daa15
mod_http_status: Report module statuses
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 ``` |
6af2d74daa15
mod_http_status: Report module statuses
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
5 $ curl http://prosody.localhost:5280/status |
6af2d74daa15
mod_http_status: Report module statuses
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 { |
6af2d74daa15
mod_http_status: Report module statuses
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
7 "example.com" : { |
6af2d74daa15
mod_http_status: Report module statuses
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
8 "c2s" : { |
6af2d74daa15
mod_http_status: Report module statuses
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
9 "message" : "Loaded", |
6af2d74daa15
mod_http_status: Report module statuses
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
10 "type" : "core" |
6af2d74daa15
mod_http_status: Report module statuses
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
11 } |
6af2d74daa15
mod_http_status: Report module statuses
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
12 } |
6af2d74daa15
mod_http_status: Report module statuses
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
13 } |
6af2d74daa15
mod_http_status: Report module statuses
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
14 ``` |
6af2d74daa15
mod_http_status: Report module statuses
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
15 |
5679
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
16 # Configuration |
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
17 |
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
18 |
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
19 By default only access via localhost is allowed. This can be adjusted with `http_status_allow_ips`. The following example shows the default: |
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
20 |
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
21 ``` |
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
22 http_status_allow_ips = { "::1"; "127.0.0.1" } |
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
23 ``` |
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
24 |
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
25 Access can also be granted to one IP range via CIDR notation: |
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
26 |
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
27 ``` |
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
28 http_status_allow_cidr = "172.17.2.0/24" |
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
29 ``` |
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
30 |
e274431bf4ce
mod_http_status: Add IP allowlisting capabilities
Kim Alvefur <zash@zash.se>
parents:
5161
diff
changeset
|
31 The default for `http_status_allow_cidr` is empty. |