synapse-v2.rules 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. groups:
  2. - name: synapse
  3. rules:
  4. # These 3 rules are used in the included Prometheus console
  5. - record: 'synapse_federation_client_sent'
  6. labels:
  7. type: "EDU"
  8. expr: 'synapse_federation_client_sent_edus_total + 0'
  9. - record: 'synapse_federation_client_sent'
  10. labels:
  11. type: "PDU"
  12. expr: 'synapse_federation_client_sent_pdu_destinations_count_total + 0'
  13. - record: 'synapse_federation_client_sent'
  14. labels:
  15. type: "Query"
  16. expr: 'sum(synapse_federation_client_sent_queries) by (job)'
  17. # These 3 rules are used in the included Prometheus console
  18. - record: 'synapse_federation_server_received'
  19. labels:
  20. type: "EDU"
  21. expr: 'synapse_federation_server_received_edus_total + 0'
  22. - record: 'synapse_federation_server_received'
  23. labels:
  24. type: "PDU"
  25. expr: 'synapse_federation_server_received_pdus_total + 0'
  26. - record: 'synapse_federation_server_received'
  27. labels:
  28. type: "Query"
  29. expr: 'sum(synapse_federation_server_received_queries) by (job)'
  30. # These 2 rules are used in the included Prometheus console
  31. - record: 'synapse_federation_transaction_queue_pending'
  32. labels:
  33. type: "EDU"
  34. expr: 'synapse_federation_transaction_queue_pending_edus + 0'
  35. - record: 'synapse_federation_transaction_queue_pending'
  36. labels:
  37. type: "PDU"
  38. expr: 'synapse_federation_transaction_queue_pending_pdus + 0'
  39. # These 3 rules are used in the included Grafana dashboard
  40. - record: synapse_storage_events_persisted_by_source_type
  41. expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep_total{origin_type="remote"})
  42. labels:
  43. type: remote
  44. - record: synapse_storage_events_persisted_by_source_type
  45. expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep_total{origin_entity="*client*",origin_type="local"})
  46. labels:
  47. type: local
  48. - record: synapse_storage_events_persisted_by_source_type
  49. expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep_total{origin_entity!="*client*",origin_type="local"})
  50. labels:
  51. type: bridges
  52. # This rule is used in the included Grafana dashboard
  53. - record: synapse_storage_events_persisted_by_event_type
  54. expr: sum without(origin_entity, origin_type) (synapse_storage_events_persisted_events_sep_total)
  55. # This rule is used in the included Grafana dashboard
  56. - record: synapse_storage_events_persisted_by_origin
  57. expr: sum without(type) (synapse_storage_events_persisted_events_sep_total)