Home/Learn/RabbitMQ/RabbitMQ Management Plugin

RabbitMQ Management Plugin

Beginner
Operations

The management plugin exposes an HTTP API and a browser UI at :15672 for inspecting exchanges, queues, bindings, connections, and consumer stats.

Overview

The RabbitMQ Management Plugin provides a browser-based UI at http://broker:15672 and a full HTTP API for observing and managing the broker. It shows real-time queue depth, message rates, consumer counts, connection details, and channel stats. The HTTP API is scriptable — you can declare exchanges/queues, publish/get messages, and collect metrics programmatically. In production, expose only the HTTP API behind a VPN and restrict management access. The prometheus plugin (rabbitmq_prometheus) exposes a /metrics endpoint for Prometheus scraping.

Enabling & Accessing the Management Plugin

Enable the management plugin once. The UI is at port 15672 (HTTP) or 15671 (HTTPS). The default admin user is guest/guest — only accessible from localhost. Create proper admin users for remote access.

Shell — enable management plugin and user setup
# Enable management plugin
rabbitmq-plugins enable rabbitmq_management

# Access UI
# http://localhost:15672
# Default credentials: guest / guest (localhost only)

# Create admin user for remote access
rabbitmqctl add_user admin StrongPass!
rabbitmqctl set_user_tags admin administrator
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"

# Delete default guest user in production
rabbitmqctl delete_user guest

# Enable HTTPS for management (recommended for production)
# rabbitmq.conf:
management.ssl.port       = 15671
management.ssl.certfile   = /etc/rabbitmq/certs/server_certificate.pem
management.ssl.keyfile    = /etc/rabbitmq/certs/server_key.pem
management.ssl.cacertfile = /etc/rabbitmq/certs/ca_certificate.pem

HTTP API

The management HTTP API (GET/PUT/POST/DELETE on /api/*) lets you inspect and manage the broker programmatically. Useful in CI/CD pipelines for health checks, declaring topology, or purging test queues.

Shell — management HTTP API examples
# HTTP API — all examples with curl

# List all queues
curl -u admin:StrongPass! http://localhost:15672/api/queues/%2F
#  %2F = URL-encoded "/" (default vhost)

# Get queue details
curl -u admin:StrongPass! http://localhost:15672/api/queues/%2F/orders.processing | jq .

# Declare a queue
curl -u admin:StrongPass! -X PUT http://localhost:15672/api/queues/%2F/test-queue \
  -H "Content-Type: application/json" \
  -d '{"durable": true, "arguments": {}}'

# Purge a queue (delete all messages — useful in tests)
curl -u admin:StrongPass! -X DELETE http://localhost:15672/api/queues/%2F/test-queue/contents

# Get one message (peek — for debugging)
curl -u admin:StrongPass! -X POST http://localhost:15672/api/queues/%2F/orders.processing/get \
  -H "Content-Type: application/json" \
  -d '{"count": 1, "ackmode": "ack_requeue_true", "encoding": "auto"}'

# Overview — cluster health summary
curl -u admin:StrongPass! http://localhost:15672/api/overview | jq .

Prometheus Metrics

Enable rabbitmq_prometheus for Prometheus scraping. It exposes /metrics with counters and gauges for queue depth, consumer count, connection count, memory usage, and message rates — perfect for Grafana dashboards.

YAML + Shell — Prometheus metrics setup
# Enable Prometheus plugin
rabbitmq-plugins enable rabbitmq_prometheus

# Default scrape endpoint: http://broker:15692/metrics

# Prometheus scrape config (prometheus.yml)
scrape_configs:
  - job_name: rabbitmq
    static_configs:
      - targets: ['rabbitmq1:15692', 'rabbitmq2:15692']

# Key metrics to monitor:
# rabbitmq_queue_messages_ready          — messages waiting (backlog)
# rabbitmq_queue_messages_unacked_total  — messages in flight (unacked by consumers)
# rabbitmq_queue_consumer_utilisation    — 0=idle, 1.0=fully utilised
# rabbitmq_global_messages_published_total — producer throughput
# rabbitmq_global_messages_delivered_total — consumer throughput
# rabbitmq_process_resident_memory_bytes — broker memory usage
# rabbitmq_connections                   — open connections

# Grafana dashboard: grafana.com/grafana/dashboards/10991
# Official RabbitMQ overview dashboard for Grafana

Key Points to Remember

  • 1Management plugin UI is at :15672; HTTP API is at /api/* — both require authentication.
  • 2Never use guest/guest in production — delete the guest user and create dedicated accounts.
  • 3The HTTP API supports full CRUD on exchanges, queues, bindings and is scriptable via curl/HTTP clients.
  • 4rabbitmq_prometheus exposes /metrics at :15692 for Prometheus scraping.
  • 5Key metrics: queue depth (messages_ready), in-flight (messages_unacked), consumer utilisation.
  • 6Use the management API in CI/CD to declare test topology, publish test messages, and purge queues.

Interview Questions

Sign in to ask Aria
1

What does the RabbitMQ management plugin expose and on which port?

EasyInfosys
2

Why should you delete the default guest user in production?

EasyPivotal
3

How would you programmatically check RabbitMQ queue depth from a CI/CD pipeline?

MediumNetflix
4

What Prometheus metrics would you monitor to detect a consumer lag problem in RabbitMQ?

HardRevolut
5

How do you purge all messages from a queue without deleting the queue?

EasyAmazon

Ask Aria about RabbitMQ Management Plugin

Your personal AI tutor — ask anything about this concept

Revision Status

Personal Notes

Sign in to save personal notes for this topic.

Discussion

Sign in to join the discussion.

Loading discussion…