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_metricsunset or set tofalseinrabbitmq.conf. The integration collects node-level totals from the/metricsendpoint 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
15692by 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:-
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 namedprometheus. The Collector also discovers RabbitMQ pods that carry theapp.kubernetes.io/name: rabbitmqlabel and listen on port15692. A CXDOT integration annotation takes precedence over the label for its container. To stop collecting from a container, setrabbitmq: {enabled: false}in the annotation. Metrics from each discovered pod include that pod’s Kubernetes metadata. For more information, see autodiscovery. -
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.
-
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/externalkey defines a named instance for the static targets. The barerabbitmqkey continues to discover pods.
Validate
To validate the RabbitMQ CXDOT Collector integration, follow these steps:-
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.targetattribute, and that each reachable node reports1. -
In Metrics Explorer, run the following query:
Confirm that the query returns one time series for each RabbitMQ node, identified by the
rabbitmq.node.nameattribute. - 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_streamplugin 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 undercollection.cxdot.integrations.rabbitmq. In a Collector configuration
file, place them under cxdot.integrations.rabbitmq.
Optional settings
-
enabledType: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. -
endpointsType:array of object. Optional. Default:[]. RabbitMQ nodes to monitor, by the address of each node’s Prometheus metrics endpoint, which therabbitmq_prometheusplugin serves on port15692by default. Specifyhost:portto request the/metricspath 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[].endpointType:string. Required. Address of one RabbitMQ node’s Prometheus metrics endpoint, ashost:portor a full HTTP or HTTPS URL. -
collection_intervalType:duration. Optional. Default:15s. How often the integration collects metrics from each RabbitMQ node. -
timeoutType: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 thancollection_intervalis lowered tocollection_interval. -
tlsType:object. Optional. Transport layer security (TLS) settings for HTTPS endpoints. The Collector verifies certificates unlessinsecure_skip_verifyistrue. These settings don’t apply to HTTP endpoints. -
tls.ca_fileType: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_verifyType: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_nameType: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_samplesType:integer. Optional. Default:0. Minimum:0. Maximum number of samples accepted from one collection. A value of0, the default, means no limit. A collection that exceeds the limit fails instead of returning an incomplete set of samples. -
follow_redirectsType:boolean. Optional. Default:true. Whether to follow HTTP redirects. If false, a redirect causes the collection to fail. -
labelsType:object. Optional. Settings that drop metric samples based on their label values. -
labels.sample_drop_rulesType:object. Optional. Default:{}. Samples to drop, as a map from a label name, as RabbitMQ exposes it (for exampleprotocolorqueue_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.+.