statsd-exporter-mappings.yaml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {{- if and .Values.mastodon.metrics.statsd.exporter.enabled (not .Values.mastodon.metrics.statsd.address) }}
  2. apiVersion: v1
  3. kind: ConfigMap
  4. metadata:
  5. name: {{ include "mastodon.fullname" . }}-statsd-mappings
  6. labels:
  7. {{- include "mastodon.labels" . | nindent 4 }}
  8. data:
  9. mastodon-statsd-mappings.yml: |-
  10. ## From https://ipng.ch/assets/mastodon/statsd-mapping.yaml
  11. ## Prometheus Statsd Exporter mapping for Mastodon 4.0+
  12. ##
  13. ## Version 1.0, November 2022
  14. ##
  15. ## Documentation: https://ipng.ch/s/articles/2022/11/27/mastodon-3.html
  16. mappings:
  17. ## Web collector
  18. - match: Mastodon\.production\.web\.(.+)\.(.+)\.(.+)\.status\.(.+)
  19. match_type: regex
  20. name: "mastodon_controller_status"
  21. labels:
  22. controller: $1
  23. action: $2
  24. format: $3
  25. status: $4
  26. mastodon: "web"
  27. - match: Mastodon\.production\.web\.(.+)\.(.+)\.(.+)\.db_time
  28. match_type: regex
  29. name: "mastodon_controller_db_time"
  30. labels:
  31. controller: $1
  32. action: $2
  33. format: $3
  34. mastodon: "web"
  35. - match: Mastodon\.production\.web\.(.+)\.(.+)\.(.+)\.view_time
  36. match_type: regex
  37. name: "mastodon_controller_view_time"
  38. labels:
  39. controller: $1
  40. action: $2
  41. format: $3
  42. mastodon: "web"
  43. - match: Mastodon\.production\.web\.(.+)\.(.+)\.(.+)\.total_duration
  44. match_type: regex
  45. name: "mastodon_controller_duration"
  46. labels:
  47. controller: $1
  48. action: $2
  49. format: $3
  50. mastodon: "web"
  51. ## Database collector
  52. - match: Mastodon\.production\.db\.tables\.(.+)\.queries\.(.+)\.duration
  53. match_type: regex
  54. name: "mastodon_db_operation"
  55. labels:
  56. table: "$1"
  57. operation: "$2"
  58. mastodon: "db"
  59. ## Cache collector
  60. - match: Mastodon\.production\.cache\.(.+)\.duration
  61. match_type: regex
  62. name: "mastodon_cache_duration"
  63. labels:
  64. operation: "$1"
  65. mastodon: "cache"
  66. ## Sidekiq collector
  67. - match: Mastodon\.production\.sidekiq\.(.+)\.processing_time
  68. match_type: regex
  69. name: "mastodon_sidekiq_worker_processing_time"
  70. labels:
  71. worker: "$1"
  72. mastodon: "sidekiq"
  73. - match: Mastodon\.production\.sidekiq\.(.+)\.success
  74. match_type: regex
  75. name: "mastodon_sidekiq_worker_success_total"
  76. labels:
  77. worker: "$1"
  78. mastodon: "sidekiq"
  79. - match: Mastodon\.production\.sidekiq\.(.+)\.failure
  80. match_type: regex
  81. name: "mastodon_sidekiq_worker_failure_total"
  82. labels:
  83. worker: "$1"
  84. mastodon: "sidekiq"
  85. - match: Mastodon\.production\.sidekiq\.queues\.(.+)\.enqueued
  86. match_type: regex
  87. name: "mastodon_sidekiq_queue_enqueued"
  88. labels:
  89. queue: "$1"
  90. mastodon: "sidekiq"
  91. - match: Mastodon\.production\.sidekiq\.queues\.(.+)\.latency
  92. match_type: regex
  93. name: "mastodon_sidekiq_queue_latency"
  94. labels:
  95. queue: "$1"
  96. mastodon: "sidekiq"
  97. - match: Mastodon\.production\.sidekiq\.(.+)
  98. match_type: regex
  99. name: "mastodon_sidekiq_$1"
  100. labels:
  101. mastodon: "sidekiq"
  102. {{- end }}