From 7efb38d1dd058dcb9e7051aeaf2019520101576d Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Sun, 19 Feb 2017 22:55:48 +0000 Subject: Update metrics-howto.rst --- docs/metrics-howto.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/metrics-howto.rst b/docs/metrics-howto.rst index ca10799b00..56e69c1859 100644 --- a/docs/metrics-howto.rst +++ b/docs/metrics-howto.rst @@ -9,11 +9,13 @@ How to monitor Synapse metrics using Prometheus prometheus itself defaults to 9090, so starting just above that for locally monitored services seems reasonable. E.g. 9092: - Add to homeserver.yaml + Add to homeserver.yaml:: metrics_port: 9092 - Restart synapse + Also ensure that ``enable_metrics`` is set to ``True``. + + Restart synapse. 3: Add a prometheus target for synapse. It needs to set the ``metrics_path`` to a non-default value:: -- cgit 1.4.1 From e556aefe0a0ac9e09429aed4436cd34aa6e586c0 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Sun, 19 Feb 2017 23:06:08 +0000 Subject: Update metrics-howto.rst --- docs/metrics-howto.rst | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/docs/metrics-howto.rst b/docs/metrics-howto.rst index 56e69c1859..231c680786 100644 --- a/docs/metrics-howto.rst +++ b/docs/metrics-howto.rst @@ -1,24 +1,27 @@ How to monitor Synapse metrics using Prometheus =============================================== -1: Install prometheus: - Follow instructions at http://prometheus.io/docs/introduction/install/ +1. Install prometheus: -2: Enable synapse metrics: - 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: + Follow instructions at http://prometheus.io/docs/introduction/install/ - Add to homeserver.yaml:: +2. Enable synapse metrics: - metrics_port: 9092 + 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: - Also ensure that ``enable_metrics`` is set to ``True``. + Add to homeserver.yaml:: + + metrics_port: 9092 + + Also ensure that ``enable_metrics`` is set to ``True``. - Restart synapse. + Restart synapse. -3: Add a prometheus target for synapse. It needs to set the ``metrics_path`` - to a non-default value:: +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" @@ -26,6 +29,9 @@ How to monitor Synapse metrics using Prometheus - targets: "my.server.here:9092" + If your prometheus is older than 1.5.2, you will need to replace + ``static_configs`` in the above with ``target_groups``. + Standard Metric Names --------------------- -- cgit 1.4.1 From 6184f6fcbcc3c37e915596a6e2013f6983c9e260 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Sun, 19 Feb 2017 23:06:45 +0000 Subject: Update metrics-howto.rst --- docs/metrics-howto.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/metrics-howto.rst b/docs/metrics-howto.rst index 231c680786..7390ab85c9 100644 --- a/docs/metrics-howto.rst +++ b/docs/metrics-howto.rst @@ -31,6 +31,8 @@ How to monitor Synapse metrics using Prometheus If your prometheus is older than 1.5.2, you will need to replace ``static_configs`` in the above with ``target_groups``. + + Restart prometheus. Standard Metric Names --------------------- -- cgit 1.4.1