From db8a3573ecd6e939acb539ede4bffcf172c263d9 Mon Sep 17 00:00:00 2001
From: Christian Paul <christianp@matrix.org>
Date: Mon, 7 Dec 2020 13:56:25 +0100
Subject: [PATCH] Add metrics to the config sample and schema

---
 config/config.sample.yaml | 5 +++++
 config/config.schema.yaml | 9 +++++++++
 2 files changed, 14 insertions(+)

diff --git a/config/config.sample.yaml b/config/config.sample.yaml
index 9f66f8f..30938c3 100644
--- a/config/config.sample.yaml
+++ b/config/config.sample.yaml
@@ -104,3 +104,8 @@ ghosts:
     nickPattern: ":nick"
     # Pattern for the ghosts username, available is :username, :tag and :id
     usernamePattern: ":username#:tag"
+# Prometheus-compatible metrics endpoint
+metrics:
+    enabled: false
+    port: 9001
+    host: "localhost"
\ No newline at end of file
diff --git a/config/config.schema.yaml b/config/config.schema.yaml
index 3942747..560508e 100644
--- a/config/config.schema.yaml
+++ b/config/config.schema.yaml
@@ -124,3 +124,12 @@ properties:
                 type: "string"
             usernamePattern:
                 type: "string"
+    metrics:
+        type: "object"
+        properties:
+            enabled:
+                type: "boolean"
+            port:
+                type: "number"
+            host:
+                type: "string"
-- 
GitLab