1
0

synapse-v2.rules 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. groups:
  2. - name: synapse
  3. rules:
  4. ###
  5. ### Prometheus Console Only
  6. ### The following rules are only needed if you use the Prometheus Console
  7. ### in contrib/prometheus/consoles/synapse.html
  8. ###
  9. - record: 'synapse_federation_client_sent'
  10. labels:
  11. type: "EDU"
  12. expr: 'synapse_federation_client_sent_edus_total + 0'
  13. - record: 'synapse_federation_client_sent'
  14. labels:
  15. type: "PDU"
  16. expr: 'synapse_federation_client_sent_pdu_destinations_count_total + 0'
  17. - record: 'synapse_federation_client_sent'
  18. labels:
  19. type: "Query"
  20. expr: 'sum(synapse_federation_client_sent_queries) by (job)'
  21. - record: 'synapse_federation_server_received'
  22. labels:
  23. type: "EDU"
  24. expr: 'synapse_federation_server_received_edus_total + 0'
  25. - record: 'synapse_federation_server_received'
  26. labels:
  27. type: "PDU"
  28. expr: 'synapse_federation_server_received_pdus_total + 0'
  29. - record: 'synapse_federation_server_received'
  30. labels:
  31. type: "Query"
  32. expr: 'sum(synapse_federation_server_received_queries) by (job)'
  33. - record: 'synapse_federation_transaction_queue_pending'
  34. labels:
  35. type: "EDU"
  36. expr: 'synapse_federation_transaction_queue_pending_edus + 0'
  37. - record: 'synapse_federation_transaction_queue_pending'
  38. labels:
  39. type: "PDU"
  40. expr: 'synapse_federation_transaction_queue_pending_pdus + 0'
  41. ###
  42. ### End of 'Prometheus Console Only' rules block
  43. ###
  44. ###
  45. ### Grafana Only
  46. ### The following rules are only needed if you use the Grafana dashboard
  47. ### in contrib/grafana/synapse.json
  48. ###
  49. - record: synapse_storage_events_persisted_by_source_type
  50. expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep_total{origin_type="remote"})
  51. labels:
  52. type: remote
  53. - record: synapse_storage_events_persisted_by_source_type
  54. expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep_total{origin_entity="*client*",origin_type="local"})
  55. labels:
  56. type: local
  57. - record: synapse_storage_events_persisted_by_source_type
  58. expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep_total{origin_entity!="*client*",origin_type="local"})
  59. labels:
  60. type: bridges
  61. - record: synapse_storage_events_persisted_by_event_type
  62. expr: sum without(origin_entity, origin_type) (synapse_storage_events_persisted_events_sep_total)
  63. - record: synapse_storage_events_persisted_by_origin
  64. expr: sum without(type) (synapse_storage_events_persisted_events_sep_total)
  65. ###
  66. ### End of 'Grafana Only' rules block
  67. ###