Skip to content
Snippets Groups Projects
Unverified Commit ac7e5683 authored by reivilibre's avatar reivilibre Committed by GitHub
Browse files

Add comments to the Prometheus recording rules to make it clear which set of...

Add comments to the Prometheus recording rules to make it clear which set of rules you need for Grafana or Prometheus Console. (#13876)
parent c9316f9f
No related branches found
No related tags found
No related merge requests found
Add comments to the Prometheus recording rules to make it clear which set of rules you need for Grafana or Prometheus Console.
\ No newline at end of file
groups: groups:
- name: synapse - name: synapse
rules: rules:
# These 3 rules are used in the included Prometheus console
###
### Prometheus Console Only
### The following rules are only needed if you use the Prometheus Console
### in contrib/prometheus/consoles/synapse.html
###
- record: 'synapse_federation_client_sent' - record: 'synapse_federation_client_sent'
labels: labels:
type: "EDU" type: "EDU"
...@@ -15,7 +20,6 @@ groups: ...@@ -15,7 +20,6 @@ groups:
type: "Query" type: "Query"
expr: 'sum(synapse_federation_client_sent_queries) by (job)' expr: 'sum(synapse_federation_client_sent_queries) by (job)'
# These 3 rules are used in the included Prometheus console
- record: 'synapse_federation_server_received' - record: 'synapse_federation_server_received'
labels: labels:
type: "EDU" type: "EDU"
...@@ -29,7 +33,6 @@ groups: ...@@ -29,7 +33,6 @@ groups:
type: "Query" type: "Query"
expr: 'sum(synapse_federation_server_received_queries) by (job)' expr: 'sum(synapse_federation_server_received_queries) by (job)'
# These 2 rules are used in the included Prometheus console
- record: 'synapse_federation_transaction_queue_pending' - record: 'synapse_federation_transaction_queue_pending'
labels: labels:
type: "EDU" type: "EDU"
...@@ -38,8 +41,16 @@ groups: ...@@ -38,8 +41,16 @@ groups:
labels: labels:
type: "PDU" type: "PDU"
expr: 'synapse_federation_transaction_queue_pending_pdus + 0' expr: 'synapse_federation_transaction_queue_pending_pdus + 0'
###
### End of 'Prometheus Console Only' rules block
###
# These 3 rules are used in the included Grafana dashboard ###
### Grafana Only
### The following rules are only needed if you use the Grafana dashboard
### in contrib/grafana/synapse.json
###
- record: synapse_storage_events_persisted_by_source_type - record: synapse_storage_events_persisted_by_source_type
expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep_total{origin_type="remote"}) expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep_total{origin_type="remote"})
labels: labels:
...@@ -53,11 +64,11 @@ groups: ...@@ -53,11 +64,11 @@ groups:
labels: labels:
type: bridges type: bridges
# This rule is used in the included Grafana dashboard
- record: synapse_storage_events_persisted_by_event_type - record: synapse_storage_events_persisted_by_event_type
expr: sum without(origin_entity, origin_type) (synapse_storage_events_persisted_events_sep_total) expr: sum without(origin_entity, origin_type) (synapse_storage_events_persisted_events_sep_total)
# This rule is used in the included Grafana dashboard
- record: synapse_storage_events_persisted_by_origin - record: synapse_storage_events_persisted_by_origin
expr: sum without(type) (synapse_storage_events_persisted_events_sep_total) expr: sum without(type) (synapse_storage_events_persisted_events_sep_total)
###
### End of 'Grafana Only' rules block
###
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment