feat(prosody): custom metrics of stanza counts for prosody service implemented (#1862)

Co-authored-by: Kushang Haria <kushangh@MacBook-Pro.local>
pull/1863/head
24kushang 4 months ago committed by GitHub
parent a88dd8bbbc
commit 54baee28b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      docker-compose.yml
  2. 6
      prosody/rootfs/defaults/prosody.cfg.lua

@ -261,6 +261,7 @@ services:
- PROSODY_RESERVATION_ENABLED - PROSODY_RESERVATION_ENABLED
- PROSODY_RESERVATION_REST_BASE_URL - PROSODY_RESERVATION_REST_BASE_URL
- PROSODY_ENABLE_RATE_LIMITS - PROSODY_ENABLE_RATE_LIMITS
- PROSODY_ENABLE_STANZA_COUNTS
- PROSODY_ENABLE_S2S - PROSODY_ENABLE_S2S
- PROSODY_ENABLE_METRICS - PROSODY_ENABLE_METRICS
- PROSODY_GUEST_AUTH_TYPE - PROSODY_GUEST_AUTH_TYPE

@ -15,6 +15,7 @@
{{ $PROSODY_METRICS_ALLOWED_CIDR := .Env.PROSODY_METRICS_ALLOWED_CIDR | default "172.16.0.0/12" -}} {{ $PROSODY_METRICS_ALLOWED_CIDR := .Env.PROSODY_METRICS_ALLOWED_CIDR | default "172.16.0.0/12" -}}
{{ $PROSODY_HTTP_PORT := .Env.PROSODY_HTTP_PORT | default "5280" -}} {{ $PROSODY_HTTP_PORT := .Env.PROSODY_HTTP_PORT | default "5280" -}}
{{ $PROSODY_ENABLE_METRICS := .Env.PROSODY_ENABLE_METRICS | default "false" | toBool -}} {{ $PROSODY_ENABLE_METRICS := .Env.PROSODY_ENABLE_METRICS | default "false" | toBool -}}
{{ $PROSODY_ENABLE_STANZA_COUNTS := .Env.PROSODY_ENABLE_STANZA_COUNTS | default "false" | toBool -}}
{{ $PROSODY_ADMINS := .Env.PROSODY_ADMINS | default "" -}} {{ $PROSODY_ADMINS := .Env.PROSODY_ADMINS | default "" -}}
{{ $PROSODY_ADMIN_LIST := splitList "," $PROSODY_ADMINS -}} {{ $PROSODY_ADMIN_LIST := splitList "," $PROSODY_ADMINS -}}
{{ $TRUSTED_PROXIES := .Env.PROSODY_TRUSTED_PROXIES | default "127.0.0.1,::1" -}} {{ $TRUSTED_PROXIES := .Env.PROSODY_TRUSTED_PROXIES | default "127.0.0.1,::1" -}}
@ -117,6 +118,11 @@ modules_enabled = {
"http_openmetrics"; "http_openmetrics";
{{ end -}} {{ end -}}
{{ if $PROSODY_ENABLE_STANZA_COUNTS }}
-- Stanza count metrics for monitoring
"measure_stanza_counts";
{{ end -}}
{{ if .Env.GLOBAL_MODULES }} {{ if .Env.GLOBAL_MODULES }}
"{{ join "\";\n\"" (splitList "," .Env.GLOBAL_MODULES) }}"; "{{ join "\";\n\"" (splitList "," .Env.GLOBAL_MODULES) }}";
{{ end }} {{ end }}

Loading…
Cancel
Save