summary refs log tree commit diff
diff options
context:
space:
mode:
authorDirk Klimpel <5740567+dklimpel@users.noreply.github.com>2022-10-07 15:54:01 +0200
committerGitHub <noreply@github.com>2022-10-07 14:54:01 +0100
commitc0e868e423c4b26db464e036af0473b48651404a (patch)
treee2af5b53da5c07483bc0d7409a316bc834af9898
parentBe more lenient in the oEmbed response parsing. (#14089) (diff)
downloadsynapse-c0e868e423c4b26db464e036af0473b48651404a.tar.xz
Improve the listener example on the metrics documentation (#14078)
Signed-off-by: Dirk Klimpel <dirk@klimpel.org>
-rw-r--r--changelog.d/14078.doc1
-rw-r--r--docs/metrics-howto.md41
2 files changed, 30 insertions, 12 deletions
diff --git a/changelog.d/14078.doc b/changelog.d/14078.doc
new file mode 100644
index 0000000000..cbe3c8b381
--- /dev/null
+++ b/changelog.d/14078.doc
@@ -0,0 +1 @@
+Improve the listener example on the metrics documentation.
diff --git a/docs/metrics-howto.md b/docs/metrics-howto.md
index d8416b5a5f..8f1f11f2b2 100644
--- a/docs/metrics-howto.md
+++ b/docs/metrics-howto.md
@@ -16,14 +16,21 @@
     There are two methods of enabling the metrics endpoint in Synapse.
 
     The first serves the metrics as a part of the usual web server and
-    can be enabled by adding the \"metrics\" resource to the existing
-    listener as such:
+    can be enabled by adding the `metrics` resource to the existing
+    listener as such as in this example:
 
     ```yaml
-      resources:
-        - names:
-          - client
-          - metrics
+    listeners:
+      - port: 8008
+        tls: false
+        type: http
+        x_forwarded: true
+        bind_addresses: ['::1', '127.0.0.1']
+
+        resources:
+          # added "metrics" in this line
+          - names: [client, federation, metrics]
+            compress: false
     ```
 
     This provides a simple way of adding metrics to your Synapse
@@ -37,14 +44,24 @@
     to just internal networks easier. The served metrics are available
     over HTTP only, and will be available at `/_synapse/metrics`.
 
-    Add a new listener to homeserver.yaml:
+    Add a new listener to homeserver.yaml as in this example:
 
     ```yaml
-      listeners:
-        - type: metrics
-          port: 9000
-          bind_addresses:
-            - '0.0.0.0'
+    listeners:
+      - port: 8008
+        tls: false
+        type: http
+        x_forwarded: true
+        bind_addresses: ['::1', '127.0.0.1']
+
+        resources:
+          - names: [client, federation]
+            compress: false
+
+      # beginning of the new metrics listener
+      - port: 9000
+        type: metrics
+        bind_addresses: ['::1', '127.0.0.1']
     ```
 
 1.  Restart Synapse.