diff --git a/services/rabbit/configs/rabbitmq.conf.j2 b/services/rabbit/configs/rabbitmq.conf.j2 index 28be26d5..8c8dda34 100644 --- a/services/rabbit/configs/rabbitmq.conf.j2 +++ b/services/rabbit/configs/rabbitmq.conf.j2 @@ -7,6 +7,12 @@ cluster_formation.peer_discovery_backend = classic_config cluster_formation.classic_config.nodes.{{ ix }} = rabbit@rabbit-node0{{ ix }}_rabbit0{{ ix }} {%- endfor %} +# explicitly set cluster name so that all nodes share the same name +# see https://github.com/rabbitmq/rabbitmq-server/discussions/11355 +# and https://groups.google.com/g/rabbitmq-users/c/A8v8XSmnCnA/m/4ZpoTtEWAQAJ +# important for grafana dashboard to work properly +cluster_name={{ RABBIT_CLUSTER_NAME }} + ## Sets the initial quorum queue replica count for newly declared quorum queues. ## This value can be overridden using the 'x-quorum-initial-group-size' queue argument ## at declaration time. diff --git a/services/rabbit/template.env b/services/rabbit/template.env index b1a0a01b..137175ee 100644 --- a/services/rabbit/template.env +++ b/services/rabbit/template.env @@ -14,3 +14,5 @@ RABBIT_NETWORK=${RABBIT_NETWORK} PUBLIC_NETWORK=${PUBLIC_NETWORK} MONITORED_NETWORK=${MONITORED_NETWORK} MONITORING_DOMAIN=${MONITORING_DOMAIN} + +RABBIT_CLUSTER_NAME=${MACHINE_FQDN}