2015-04-23 11:07:49 -04:00
|
|
|
How to monitor Synapse metrics using Prometheus
|
|
|
|
===============================================
|
|
|
|
|
2015-04-23 11:14:08 -04:00
|
|
|
1: Install prometheus:
|
2015-04-23 11:07:49 -04:00
|
|
|
Follow instructions at http://prometheus.io/docs/introduction/install/
|
|
|
|
|
2015-04-23 11:14:08 -04:00
|
|
|
2: Enable synapse metrics:
|
2015-04-23 11:07:49 -04:00
|
|
|
Simply setting a (local) port number will enable it. Pick a port.
|
|
|
|
prometheus itself defaults to 9090, so starting just above that for
|
|
|
|
locally monitored services seems reasonable. E.g. 9092:
|
|
|
|
|
|
|
|
Add to homeserver.yaml
|
|
|
|
|
|
|
|
metrics_port: 9092
|
|
|
|
|
|
|
|
Restart synapse
|
|
|
|
|
2016-10-28 08:58:27 -04:00
|
|
|
3: Add a prometheus target for synapse. It needs to set the ``metrics_path``
|
|
|
|
to a non-default value::
|
|
|
|
|
|
|
|
- job_name: "synapse"
|
|
|
|
metrics_path: "/_synapse/metrics"
|
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
"my.server.here:9092"
|