Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 036fab5

Browse files
authored
Document monitoring workers (#7357)
It doesn't seem to be documented anywhere and means that you suddenly start losing metrics without any obvious reason when you go from monolith to workers (e.g. #7312).
1 parent aa24929 commit 036fab5

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

changelog.d/7357.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add documentation on monitoring workers with Prometheus.

docs/metrics-howto.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,31 @@
6060

6161
1. Restart Prometheus.
6262

63+
## Monitoring workers
64+
65+
To monitor a Synapse installation using
66+
[workers](https://github.com/matrix-org/synapse/blob/master/docs/workers.md),
67+
every worker needs to be monitored independently, in addition to
68+
the main homeserver process. This is because workers don't send
69+
their metrics to the main homeserver process, but expose them
70+
directly (if they are configured to do so).
71+
72+
To allow collecting metrics from a worker, you need to add a
73+
`metrics` listener to its configuration, by adding the following
74+
under `worker_listeners`:
75+
76+
```yaml
77+
- type: metrics
78+
bind_address: ''
79+
port: 9101
80+
```
81+
82+
The `bind_address` and `port` parameters should be set so that
83+
the resulting listener can be reached by prometheus, and they
84+
don't clash with an existing worker.
85+
With this example, the worker's metrics would then be available
86+
on `http://127.0.0.1:9101`.
87+
6388
## Renaming of metrics & deprecation of old names in 1.2
6489

6590
Synapse 1.2 updates the Prometheus metrics to match the naming

0 commit comments

Comments
 (0)