RabbitMQ Monitoring

Optimize the performance of your RabbitMQ instances with all-at-once view of key metrics.

RabbitMQ is a message broker tool that routes messages between producers and consumers. It is open source and functions based on the Advanced Message Queuing Protocol (AMQP).

This document details the following:

Performance Monitoring Metrics

Take informed troubleshooting decisions by keeping track of critical metrics including:

File Descriptors Used

Knowing the total amount of file descriptors used will prove helpful to ensure intact access to input/output resources such as files.

Memory Used

The total amount of memory used by the queuing service (in bytes) helps to avoid sudden memory alarms and throttled connections.

Queued Messages

The average number of Erlang processes waiting to run in a queue. For ease of understanding, they are numbered by depicting them as processes.

Sockets Used

The total number of file descriptors used as sockets is given by the metric sockets_used.

Partitions

partitions give the total number of network partitions that this node is seeing. With this metric, you can ensure your RabbitMQ cluster remains available at all times.

Consumers

The published messages are routed by RabbitMQ to another part of your application, called consumers.

Ready Messages

The total number of messages_ready ready to be delivered/available to consumers.

Unacknowledged Messages

messages_unacknowledged gives the number of messages a queue has delivered without receiving an acknowledgment from a consumer

Message Rate

messages_rate provides a count of the total messages that are in the queue, be it unacknowledged, delivered, acknowledged, or redelivered.

Prerequisites

  • Our Linux server monitoring agent should be installed in the network or on the specific host where the instance is running
  • While adding a plugin, the plugin name and its folder name should be identical
  • Ensure the rabbitmq-management plugin is configured to get the performance metrics.

Plugin Installation

  • Download and install the latest version of the Site24x7 Linux agent in the server where you plan to run the plugin. If it is installed successfully, you will see a Linux server monitor in the Site24x7 Control Panel. This confirms that the agent is able to communicate with our data center.
  • Download the "rabbitmq.py" file from our GitHub repository
    wget https://raw.githubusercontent.com/site24x7/plugins/master/rabbitmq/rabbitmq.py
  • By default, the plugin will use the status url http://127.0.0.1:15672/api/overview to fetch the performance metrics. To change the existing configuration, edit the '#Config Section' in the 'rabbitmq.py' file
    #Config Section:
    RABBITMQ_HOST='localhost'
    RABBITMQ_PORT="15672"
    RABBITMQ_API_URI="/api/overview"
    RABBITMQ_NODES_URI="/api/nodes"
    RABBITMQ_USERNAME='guest'
    RABBITMQ_PASSWORD='guest'
  • Create a folder with the name "rabbitmq", under the Site24x7 Linux agent plugin directory '/opt/site24x7/monagent/plugins/' and place the 'rabbitmq.py' under '/opt/site24x7/monagent/plugins/rabbitmq/'

The agent will automatically execute the plugin within five minutes and send performance data to the Site24x7 data center.

View Data in the Site24x7 Web Client

  1. Login and go to Server > Plugins > Name of Plugin Monitor
  2. You will be able to view the performance charts on the various metrics for your RabbitMQ server.

Plugin Contribution

Feel free to contribute to our existing plugin and come up with suggestions or feedback on our Community.

Related plugins: