Skip to content

Monitor RabbitMQ with OpenTelemetry

Osuite monitors RabbitMQ through the OpenTelemetry Collector’s rabbitmq receiver, which reads the Management Plugin’s HTTP API and exports per-queue metrics over OTLP. Message backlogs and consumer counts arrive with the same resource attributes as your services, so a stalled worker in APM lines up with the queue it drains.

  • A reachable RabbitMQ node with the Management Plugin enabled (the receiver scrapes its HTTP API on port 15672).
  • A user with at least monitoring-level permissions.

Enable the plugin and create a monitoring user:

Terminal window
rabbitmq-plugins enable rabbitmq_management
rabbitmqctl add_user otel a-strong-password
rabbitmqctl set_user_tags otel monitoring
rabbitmqctl set_permissions -p / otel "" "" ".*"

Export the password to the Collector’s environment:

Terminal window
export RABBITMQ_PASSWORD='a-strong-password'
  1. Add the rabbitmq receiver, the otlp/osuite exporter, and a metrics pipeline. Pick the tab that matches where your Collector runs — only the receiver endpoint changes.

    receivers:
    rabbitmq:
    endpoint: http://localhost:15672
    username: otel
    password: ${env:RABBITMQ_PASSWORD}
    collection_interval: 30s
    processors:
    batch:
    resourcedetection:
    exporters:
    otlp/osuite:
    endpoint: ingest.<region>.osuite.io:443
    headers:
    x-osuite-ingest-token: <your-ingest-token>
    service:
    pipelines:
    metrics:
    receivers: [rabbitmq]
    processors: [batch, resourcedetection]
    exporters: [otlp/osuite]
  2. Start the Collector. On Docker and Kubernetes, the Collector and RabbitMQ must share a network so the endpoint resolves.

What you should see

Metrics named rabbitmq.* appear in Dashboards → Explore metrics within a minute, broken down by queue and virtual host.

MetricDescriptionUnit
rabbitmq.message.currentMessages currently in the queue, by state{messages}
rabbitmq.message.publishedMessages published to the queue{messages}
rabbitmq.message.deliveredMessages delivered to consumers{messages}
rabbitmq.message.acknowledgedMessages acknowledged by consumers{messages}
rabbitmq.message.droppedUnroutable messages discarded{messages}
rabbitmq.consumer.countConsumers reading from the queue{consumers}

Node-level metrics (memory, disk, file descriptors, socket usage) are available by enabling the receiver’s optional node metrics.

Once metrics arrive, build a RabbitMQ dashboard in the dashboard builder from the series above. Alerts in Osuite are PromQL-based — see Alerts. Useful starting conditions: a growing rabbitmq.message.current in the ready state, a rabbitmq.consumer.count of zero on an active queue, and a rising rabbitmq.message.dropped rate.

  • Connection refused on 15672 — confirm the Management Plugin is enabled and listening; the receiver uses the HTTP API, not AMQP on 5672.
  • 401 Unauthorized — confirm the otel user has the monitoring tag and read permissions on the virtual hosts you monitor.

No data in Osuite after a few minutes? Work through these checks.

  • Endpoint — confirm the exporter targets exactly ingest.<region>.osuite.io:443 for your region, over TLS.
  • Token — confirm the ingest header carries a valid <your-ingest-token> and has not been rotated.
  • Pipeline — confirm the signal you expect (traces, logs, or metrics) is wired into an active pipeline with the otlp/osuite exporter attached.
  • Export errors — check the application or Collector logs for OTLP export failures (auth, DNS, TLS, connection refused).
  • Network — confirm the host has outbound access to the ingest endpoint on port 443.
  • Timing — allow up to a minute for the first data to appear before assuming a failure.

Still stuck? Ask the Investigation Agent or contact support.