Skip to main content
The RabbitMQ integration requires CXDOT Collector 1.18.0 or greater. RabbitMQ is an open source message broker. Use the RabbitMQ CXDOT Collector integration to collect connection, channel, queue, message, and Erlang runtime metrics from RabbitMQ nodes running in your environment. The RabbitMQ CXDOT Collector integration supports RabbitMQ 4.3 or greater.

Supported telemetry types

The RabbitMQ CXDOT Collector integration supports these telemetry types:

Prerequisites

The RabbitMQ CXDOT Collector integration has the following prerequisites:
  • Enable the RabbitMQ Prometheus plugin, rabbitmq_prometheus, on each node. The integration collects metrics from this plugin, not from the management plugin’s HTTP API. The official RabbitMQ container images and the RabbitMQ Cluster Operator for Kubernetes enable the plugin by default. To confirm that a node has the plugin enabled, run the following command on the node:
  • Keep the plugin’s default aggregated output: leave prometheus.return_per_object_metrics unset or set to false in rabbitmq.conf. The integration collects node-level totals from the /metrics endpoint and doesn’t support the plugin’s per-object metrics, which break those totals down by individual queue, exchange, or connection.
  • Make the plugin’s metrics endpoint, port 15692 by default, reachable from the CXDOT Collector. The integration doesn’t send credentials, so the endpoint must accept requests without authentication.
  • Serve metrics without requiring a client certificate. The integration verifies a node’s TLS certificate over HTTPS but can’t present a client certificate of its own. A node whose metrics listener requires one refuses the connection.

Configure

The RabbitMQ integration is enabled by default. You can configure targets either by annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm values. To configure the RabbitMQ CXDOT Collector integration, follow these steps:
  1. To collect from RabbitMQ pods in Kubernetes, add a CXDOT integration annotation to the pod template. The annotation key must end with the container name. For example, add the following annotation to your RabbitMQ workload:
    The Collector replaces ${target.host} with the pod IP address and ${target.port.prometheus} with the container port named prometheus. The Collector also discovers RabbitMQ pods that carry the app.kubernetes.io/name: rabbitmq label and listen on port 15692. A CXDOT integration annotation takes precedence over the label for its container. To stop collecting from a container, set rabbitmq: {enabled: false} in the annotation. Metrics from each discovered pod include that pod’s Kubernetes metadata. For more information, see autodiscovery.
  2. Optional: To collect from RabbitMQ nodes outside your Kubernetes cluster, configure static targets. For example, add the following to the Helm values for your CXDOT Collector:
    When you configure static targets, this integration instance collects from exactly those targets instead of discovered targets. Each node reports only its own metrics, so list every node in your RabbitMQ cluster, each by an address that reaches that node alone rather than a load balancer or a Kubernetes Service.
  3. Optional: Configure a second integration instance to collect from both annotated pods and static targets. For example, add the following to the Helm values for your CXDOT Collector:
    The rabbitmq/external key defines a named instance for the static targets. The bare rabbitmq key continues to discover pods.

Validate

To validate the RabbitMQ CXDOT Collector integration, follow these steps:
  1. In Metrics Explorer, run the following query:
    Confirm that the query returns one time series for each RabbitMQ node you expect, with the requested URL in the cxdot.integration.target attribute, and that each reachable node reports 1.
  2. In Metrics Explorer, run the following query:
    Confirm that the query returns one time series for each RabbitMQ node, identified by the rabbitmq.node.name attribute.
  3. Optional: Open the Overview dashboard that the integration provides, which shows node resources and limits, connections, channels, consumers, and the flow of messages through channels and queues. Confirm that its panels show data for your nodes.

Troubleshooting

  • Stream metrics are missing: The stream protocol’s metrics, such as stream errors and consumer offset lag, appear only on nodes with the rabbitmq_stream plugin enabled. Nodes without the plugin don’t report them.

Configuration reference

Configure one RabbitMQ integration instance with the following settings. In Helm values, place these settings under collection.cxdot.integrations.rabbitmq. In a Collector configuration file, place them under cxdot.integrations.rabbitmq.

Optional settings

  • enabled Type: boolean. Optional. Default: true. Whether to enable this RabbitMQ integration instance. If true, the Collector collects metrics from the RabbitMQ nodes that this instance is configured for. If false, the Collector doesn’t run this integration instance.
  • endpoints Type: array of object. Optional. Default: []. RabbitMQ nodes to monitor, by the address of each node’s Prometheus metrics endpoint, which the rabbitmq_prometheus plugin serves on port 15692 by default. Specify host:port to request the /metrics path over HTTP, or a full HTTP or HTTPS URL. For a URL without a path, the Collector requests /metrics. Each node reports only its own metrics, so list every node of a cluster, each by an address that reaches that node alone.
  • endpoints[].endpoint Type: string. Required. Address of one RabbitMQ node’s Prometheus metrics endpoint, as host:port or a full HTTP or HTTPS URL.
  • collection_interval Type: duration. Optional. Default: 15s. How often the integration collects metrics from each RabbitMQ node.
  • timeout Type: duration. Optional. Default: 10s. Maximum time the Collector waits for one collection from a RabbitMQ node. The value must be greater than zero. A value longer than collection_interval is lowered to collection_interval.
  • tls Type: object. Optional. Transport layer security (TLS) settings for HTTPS endpoints. The Collector verifies certificates unless insecure_skip_verify is true. These settings don’t apply to HTTP endpoints.
  • tls.ca_file Type: string. Optional. Path to a PEM-encoded certificate authority (CA) certificate file used to verify the RabbitMQ node’s server certificate. If set, the Collector trusts only the certificate authorities in this file instead of the system certificate authority pool.
  • tls.insecure_skip_verify Type: boolean. Optional. Whether to skip verification of the RabbitMQ node’s server certificate. If true, the connection is encrypted but isn’t authenticated and is vulnerable to man-in-the-middle attacks. If false, the Collector verifies the server certificate.
  • tls.server_name Type: string. Optional. Server name to verify in the RabbitMQ node’s server certificate instead of the endpoint hostname. The Collector also sends this name as the TLS server name indication. Use this setting when the certificate name differs from the endpoint hostname.
  • max_samples Type: integer. Optional. Default: 0. Minimum: 0. Maximum number of samples accepted from one collection. A value of 0, the default, means no limit. A collection that exceeds the limit fails instead of returning an incomplete set of samples.
  • follow_redirects Type: boolean. Optional. Default: true. Whether to follow HTTP redirects. If false, a redirect causes the collection to fail.
  • labels Type: object. Optional. Settings that drop metric samples based on their label values.
  • labels.sample_drop_rules Type: object. Optional. Default: {}. Samples to drop, as a map from a label name, as RabbitMQ exposes it (for example protocol or queue_type), to a list of regular expressions matched against the label’s whole value. A sample is dropped when any listed label matches. To drop a sample whenever the label has a non-empty value, use .+.