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

Document monitoring workers #7357

Merged
merged 3 commits into from
Apr 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/7357.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add documentation on monitoring workers with Prometheus.
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, but expose them
directly (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
```

The `bind_address` and `port` parameters should be set so that
the resulting listener can be reached by prometheus, and they
don't clash with an existing worker.
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