mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Improve the listener example on the metrics documentation (#14078)
Signed-off-by: Dirk Klimpel <dirk@klimpel.org>
This commit is contained in:
parent
00c93d2e7e
commit
c0e868e423
1
changelog.d/14078.doc
Normal file
1
changelog.d/14078.doc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Improve the listener example on the metrics documentation.
|
@ -16,14 +16,21 @@
|
|||||||
There are two methods of enabling the metrics endpoint in Synapse.
|
There are two methods of enabling the metrics endpoint in Synapse.
|
||||||
|
|
||||||
The first serves the metrics as a part of the usual web server and
|
The first serves the metrics as a part of the usual web server and
|
||||||
can be enabled by adding the \"metrics\" resource to the existing
|
can be enabled by adding the `metrics` resource to the existing
|
||||||
listener as such:
|
listener as such as in this example:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
resources:
|
listeners:
|
||||||
- names:
|
- port: 8008
|
||||||
- client
|
tls: false
|
||||||
- metrics
|
type: http
|
||||||
|
x_forwarded: true
|
||||||
|
bind_addresses: ['::1', '127.0.0.1']
|
||||||
|
|
||||||
|
resources:
|
||||||
|
# added "metrics" in this line
|
||||||
|
- names: [client, federation, metrics]
|
||||||
|
compress: false
|
||||||
```
|
```
|
||||||
|
|
||||||
This provides a simple way of adding metrics to your Synapse
|
This provides a simple way of adding metrics to your Synapse
|
||||||
@ -37,14 +44,24 @@
|
|||||||
to just internal networks easier. The served metrics are available
|
to just internal networks easier. The served metrics are available
|
||||||
over HTTP only, and will be available at `/_synapse/metrics`.
|
over HTTP only, and will be available at `/_synapse/metrics`.
|
||||||
|
|
||||||
Add a new listener to homeserver.yaml:
|
Add a new listener to homeserver.yaml as in this example:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
listeners:
|
listeners:
|
||||||
- type: metrics
|
- port: 8008
|
||||||
port: 9000
|
tls: false
|
||||||
bind_addresses:
|
type: http
|
||||||
- '0.0.0.0'
|
x_forwarded: true
|
||||||
|
bind_addresses: ['::1', '127.0.0.1']
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- names: [client, federation]
|
||||||
|
compress: false
|
||||||
|
|
||||||
|
# beginning of the new metrics listener
|
||||||
|
- port: 9000
|
||||||
|
type: metrics
|
||||||
|
bind_addresses: ['::1', '127.0.0.1']
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Restart Synapse.
|
1. Restart Synapse.
|
||||||
|
Loading…
Reference in New Issue
Block a user