summaryrefslogtreecommitdiff
path: root/hosts/surtr/prometheus/synapse-v2.rules
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-04-09 00:31:36 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2022-04-09 00:31:36 +0200
commit2084863d352fd059ee0f6abfef7965beb6b9c74e (patch)
tree039e389436cdf10dbd84b4b1c7b1376b7491b73e /hosts/surtr/prometheus/synapse-v2.rules
parent14e731f40b91976976cc8b72f267bc90b0f07521 (diff)
downloadnixos-2084863d352fd059ee0f6abfef7965beb6b9c74e.tar
nixos-2084863d352fd059ee0f6abfef7965beb6b9c74e.tar.gz
nixos-2084863d352fd059ee0f6abfef7965beb6b9c74e.tar.bz2
nixos-2084863d352fd059ee0f6abfef7965beb6b9c74e.tar.xz
nixos-2084863d352fd059ee0f6abfef7965beb6b9c74e.zip
surtr: synapse metrics
Diffstat (limited to 'hosts/surtr/prometheus/synapse-v2.rules')
-rw-r--r--hosts/surtr/prometheus/synapse-v2.rules78
1 files changed, 78 insertions, 0 deletions
diff --git a/hosts/surtr/prometheus/synapse-v2.rules b/hosts/surtr/prometheus/synapse-v2.rules
new file mode 100644
index 00000000..7e405bf7
--- /dev/null
+++ b/hosts/surtr/prometheus/synapse-v2.rules
@@ -0,0 +1,78 @@
1groups:
2- name: synapse
3 rules:
4 - record: "synapse_federation_transaction_queue_pendingEdus:total"
5 expr: "sum(synapse_federation_transaction_queue_pendingEdus or absent(synapse_federation_transaction_queue_pendingEdus)*0)"
6 - record: "synapse_federation_transaction_queue_pendingPdus:total"
7 expr: "sum(synapse_federation_transaction_queue_pendingPdus or absent(synapse_federation_transaction_queue_pendingPdus)*0)"
8 - record: 'synapse_http_server_request_count:method'
9 labels:
10 servlet: ""
11 expr: "sum(synapse_http_server_request_count) by (method)"
12 - record: 'synapse_http_server_request_count:servlet'
13 labels:
14 method: ""
15 expr: 'sum(synapse_http_server_request_count) by (servlet)'
16
17 - record: 'synapse_http_server_request_count:total'
18 labels:
19 servlet: ""
20 expr: 'sum(synapse_http_server_request_count:by_method) by (servlet)'
21
22 - record: 'synapse_cache:hit_ratio_5m'
23 expr: 'rate(synapse_util_caches_cache:hits[5m]) / rate(synapse_util_caches_cache:total[5m])'
24 - record: 'synapse_cache:hit_ratio_30s'
25 expr: 'rate(synapse_util_caches_cache:hits[30s]) / rate(synapse_util_caches_cache:total[30s])'
26
27 - record: 'synapse_federation_client_sent'
28 labels:
29 type: "EDU"
30 expr: 'synapse_federation_client_sent_edus + 0'
31 - record: 'synapse_federation_client_sent'
32 labels:
33 type: "PDU"
34 expr: 'synapse_federation_client_sent_pdu_destinations:count + 0'
35 - record: 'synapse_federation_client_sent'
36 labels:
37 type: "Query"
38 expr: 'sum(synapse_federation_client_sent_queries) by (job)'
39
40 - record: 'synapse_federation_server_received'
41 labels:
42 type: "EDU"
43 expr: 'synapse_federation_server_received_edus + 0'
44 - record: 'synapse_federation_server_received'
45 labels:
46 type: "PDU"
47 expr: 'synapse_federation_server_received_pdus + 0'
48 - record: 'synapse_federation_server_received'
49 labels:
50 type: "Query"
51 expr: 'sum(synapse_federation_server_received_queries) by (job)'
52
53 - record: 'synapse_federation_transaction_queue_pending'
54 labels:
55 type: "EDU"
56 expr: 'synapse_federation_transaction_queue_pending_edus + 0'
57 - record: 'synapse_federation_transaction_queue_pending'
58 labels:
59 type: "PDU"
60 expr: 'synapse_federation_transaction_queue_pending_pdus + 0'
61
62 - record: synapse_storage_events_persisted_by_source_type
63 expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep{origin_type="remote"})
64 labels:
65 type: remote
66 - record: synapse_storage_events_persisted_by_source_type
67 expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep{origin_entity="*client*",origin_type="local"})
68 labels:
69 type: local
70 - record: synapse_storage_events_persisted_by_source_type
71 expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep{origin_entity!="*client*",origin_type="local"})
72 labels:
73 type: bridges
74 - record: synapse_storage_events_persisted_by_event_type
75 expr: sum without(origin_entity, origin_type) (synapse_storage_events_persisted_events_sep)
76 - record: synapse_storage_events_persisted_by_origin
77 expr: sum without(type) (synapse_storage_events_persisted_events_sep)
78