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

Commit

Permalink
Document monitoring workers
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
babolivier authored Apr 27, 2020
1 parent aa24929 commit 1c6b89d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/metrics-howto.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,31 @@

1. Restart Prometheus.

## Monitoring workers

To monitor a Synapse installation using
[workers](https://github.com/matrix-org/synapse/blob/master/docs/workers.md),
every worker needs to be monitored independently, in addition to
the main homeserver process. This is because workers don't send
their metrics to the main homeserver process, and therefore
expose their own metrics themselves (if they are configured to
do so).

To allow collecting metrics from a worker, you need to add a
`metrics` listener to its configuration, by adding the following
under `worker_listeners`:

```yaml
- type: metrics
bind_address: ''
port: 9101
```
Feel free to change the `bind_address` and `port` parameters
as long as the resulting listener can be reached by prometheus.
With this example, the worker's metrics would then be available
on `http://127.0.0.1:9101`.

## Renaming of metrics & deprecation of old names in 1.2

Synapse 1.2 updates the Prometheus metrics to match the naming
Expand Down

0 comments on commit 1c6b89d

Please sign in to comment.