Skip to content

Commit

Permalink
Enable management api metrics collection
Browse files Browse the repository at this point in the history
The default rabbitmq image disables metrics collection via the management
api. This is implemented by adding a file named:

/etc/rabbitmq/conf.d/management_agent.disable_metrics_collector.conf

with the contents:

management_agent.disable_metrics_collector = true

The prometheus exporter currently used by osh requires this value to be
false.

This change was introduced when rabbit introduced the integrated
prometheus exporter:

docker-library/rabbitmq#419

Change-Id: I9a94f49a7827bb4725ed3fd98404e637bfefa086
  • Loading branch information
Ritchie, Frank (fr801x) committed Dec 18, 2023
1 parent f66c924 commit 5cbce03
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rabbitmq/Chart.yaml
Expand Up @@ -15,6 +15,6 @@ apiVersion: v1
appVersion: v3.9.0
description: OpenStack-Helm RabbitMQ
name: rabbitmq
version: 0.1.30
version: 0.1.31
home: https://github.com/rabbitmq/rabbitmq-server
...
4 changes: 4 additions & 0 deletions rabbitmq/templates/configmap-etc.yaml
Expand Up @@ -77,4 +77,8 @@ data:
rabbitmq-env.conf: |
SERVER_ADDITIONAL_ERL_ARGS={{ $erlvm_scheduler_conf | quote }}
{{- end }}
{{ if not .Values.conf.prometheus_exporter.rabbitmq_mgmt_metrics_collector_disabled }}
management_agent.disable_metrics_collector.conf: |
management_agent.disable_metrics_collector = false
{{- end }}
{{ end }}
6 changes: 6 additions & 0 deletions rabbitmq/templates/statefulset.yaml
Expand Up @@ -290,6 +290,12 @@ spec:
subPath: erl_inetrc
readOnly: true
{{- end }}
{{- if not .Values.conf.prometheus_exporter.rabbitmq_mgmt_metrics_collector_disabled }}
- name: rabbitmq-etc
mountPath: /etc/rabbitmq/conf.d/management_agent.disable_metrics_collector.conf
subPath: management_agent.disable_metrics_collector.conf
readOnly: true
{{- end }}
{{ dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.secrets.tls.oslo_messaging.server.internal "path" "/etc/rabbitmq/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }}
volumes:
- name: pod-tmp
Expand Down
1 change: 1 addition & 0 deletions rabbitmq/values.yaml
Expand Up @@ -189,6 +189,7 @@ conf:
skip_queues: "^$"
include_queues: ".*"
rabbit_exporters: "overview,exchange,node,queue"
rabbitmq_mgmt_metrics_collector_disabled: false
# This IP could be IPv4/IPv6 and the tcp port will be appended to it and eventually it is set to rabbitmq.listeners.tcp.1
bind_address: "::"
rabbitmq:
Expand Down
1 change: 1 addition & 0 deletions releasenotes/notes/rabbitmq.yaml
Expand Up @@ -30,4 +30,5 @@ rabbitmq:
- 0.1.28 Add IPv6 environment support for rabbitmq
- 0.1.29 Add build-in prometheus plugin and disable external exporter
- 0.1.30 Add labels to rabbitmq service
- 0.1.31 Support management api metrics collection
...

0 comments on commit 5cbce03

Please sign in to comment.