From 93f19b5ab66021ed44101bef8615de7225c44c95 Mon Sep 17 00:00:00 2001 From: transcaffeine Date: Mon, 23 Nov 2020 20:12:42 +0100 Subject: [PATCH 1/2] Add missing prometheus rules for persisted events The official dashboard uses data from these rules, but they were never added to the synapse-v2.rules. They are mentioned in [this issue](https://github.com/matrix-org/synapse/issues/7917#issuecomment-661330409), but never got added to the rules. Adding them results in all graphs in the "Event persist rate" section to function as intended. --- contrib/prometheus/synapse-v2.rules | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/contrib/prometheus/synapse-v2.rules b/contrib/prometheus/synapse-v2.rules index 6ccca2daaf22..7e405bf7f0fe 100644 --- a/contrib/prometheus/synapse-v2.rules +++ b/contrib/prometheus/synapse-v2.rules @@ -58,3 +58,21 @@ groups: labels: type: "PDU" expr: 'synapse_federation_transaction_queue_pending_pdus + 0' + + - record: synapse_storage_events_persisted_by_source_type + expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep{origin_type="remote"}) + labels: + type: remote + - record: synapse_storage_events_persisted_by_source_type + expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep{origin_entity="*client*",origin_type="local"}) + labels: + type: local + - record: synapse_storage_events_persisted_by_source_type + expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep{origin_entity!="*client*",origin_type="local"}) + labels: + type: bridges + - record: synapse_storage_events_persisted_by_event_type + expr: sum without(origin_entity, origin_type) (synapse_storage_events_persisted_events_sep) + - record: synapse_storage_events_persisted_by_origin + expr: sum without(type) (synapse_storage_events_persisted_events_sep) + From 497d736b54223ac981d5f65134104a3fde349354 Mon Sep 17 00:00:00 2001 From: transcaffeine Date: Mon, 23 Nov 2020 20:50:48 +0100 Subject: [PATCH 2/2] Add changelog entry Signed-off-by: Johanna Dorothea Reichmann --- changelog.d/8802.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/8802.doc diff --git a/changelog.d/8802.doc b/changelog.d/8802.doc new file mode 100644 index 000000000000..580c4281f8cb --- /dev/null +++ b/changelog.d/8802.doc @@ -0,0 +1 @@ +Fix the "Event persist rate" section of the included grafana dashboard by adding missing prometheus rules.