From cacfcfef8fe1d0651d316228392ab73248bff887 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Thu, 8 Dec 2022 14:17:04 +0000 Subject: [PATCH 1/2] Remove job~= condition and aggregate with max() The job~= condition is not portable: it depends on how we do things on EMS and matrix.org Other people don't set up their job names the same way we do. Therefore we can't rely on job~= and cut it out. But doing that means that you end up with one trace per worker. To avoid this being a problem, I propose we aggregate them with max() so we take the number from the correct worker that is reporting MAU. --- contrib/grafana/synapse.json | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/contrib/grafana/synapse.json b/contrib/grafana/synapse.json index 68705b6e6d26..f09cd6f87c28 100644 --- a/contrib/grafana/synapse.json +++ b/contrib/grafana/synapse.json @@ -1008,8 +1008,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1681,8 +1680,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2533,8 +2531,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -11296,7 +11293,7 @@ "uid": "$datasource" }, "editorMode": "code", - "expr": "synapse_admin_mau_max{instance=\"$instance\", job=~\"(hhs_)?synapse\"}", + "expr": "max(synapse_admin_mau_max{instance=\"$instance\"})", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -11310,7 +11307,7 @@ "uid": "$datasource" }, "editorMode": "code", - "expr": "synapse_admin_mau_current{instance=\"$instance\", job=~\"(hhs_)?synapse\"}", + "expr": "max(synapse_admin_mau_current{instance=\"$instance\"})", "hide": false, "legendFormat": "Current", "range": true, @@ -12760,6 +12757,6 @@ "timezone": "", "title": "Synapse", "uid": "000000012", - "version": 149, + "version": 150, "weekStart": "" } \ No newline at end of file From f9982fcbce9d78429aea99e565e01aca6427ddaf Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Thu, 8 Dec 2022 14:21:04 +0000 Subject: [PATCH 2/2] Newsfile Signed-off-by: Olivier Wilkinson (reivilibre) --- changelog.d/14644.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/14644.bugfix diff --git a/changelog.d/14644.bugfix b/changelog.d/14644.bugfix new file mode 100644 index 000000000000..711088bb7ed2 --- /dev/null +++ b/changelog.d/14644.bugfix @@ -0,0 +1 @@ +Fix the *MAU Limits* section of the Grafana dashboard relying on a specific `job` name for the workers of a Synapse deployment. \ No newline at end of file