Skip to main content
Version: NG-2.14

RabbitMQ

Introduction

RabbitMQ is message-queuing software, acting as a messaging broker to facilitate communication between disparate systems.

Getting Started

Compatibility

RabbitMQ O11ySource is compatible for all versions of RabbitMQ equal to or greater than 3.13.1.

Data Collection Method

vuSmartMaps collects health and performance data for RabbitMQ using an internal data collector. This data collector collects data based on the source configuration.

Prerequisites

Dependent Configuration

To configure this O11ySource, create a 'credential' of type 'user' under the 'Definition' tab.

Inputs for Configuring Data Source

  • RabbitMQ Host: Name/Address of the host where the RabbitMQ instance is running
  • RabbitMQ Management Plugin Credential: These are the access credentials for the RabbitMQ Management Plugin
  • Interval (in Seconds): Interval in seconds. Interval should be between 60 - 100000
  • Nodes: These are the details of all the nodes in a RabbitMQ Cluster, If it is not a cluster, only master node details can be added.
  • Node Address: IP address of the RabbitMQ Node
  • RabbitMQ Prometheus Plugin Port: Provide the port to connect to Prometheus plugin of RabbitMQ instance

Firewall Requirement

To collect data from this O11ySource, ensure the following ports are opened:

Source IPDestination IPDestination PortProtocolDirection
All vuSmartMaps IPsRabbitMQ Server IPRabbitMQ Prometheus Plugin Port (15692)TCPOutbound

*Before providing the firewall requirements, please update the port based on the customer environment.

Configuring the Target

The following are the configurations are required for RabbitMQ monitoring. Only a root user can make changes listed in this document for setting up RabbitMQ for monitoring. These steps can be executed from inside a container or pod if the RabbitMQ service is running inside a container from any path. On the other hand, the steps can be executed on the host itself, if RabbitMQ is running as a service in a standalone server.

  • Check RabbitMQ Cluster Status: Run the following command to check the cluster status:
sudo rabbitmqctl cluster_status
  • Determine Cluster Status: Review the output of the cluster status command to identify whether RabbitMQ is running as a cluster. For this, look for multiple nodes listed under "Running Nodes" or "Disk Nodes".
  • Authentication Configuration: Before enabling the Prometheus plugin, verify if the Prometheus endpoint, which will be used to scrape metrics, needs to be secured. If security is required, follow these steps:
  • *Enable the management plugin using the command:
rabbitmq-plugins enable rabbitmq_management
  • *Create a user that can access the management plugin: This user will be used for Prometheus authentication as well. Use the following example to create a user with complete access to the management UI/HTTP API (i.e., all virtual hosts and management features):
rabbitmqctl add_user <username> <password>


rabbitmqctl set_user_tags <username> administrator
  • *Enable authentication for the Prometheus plugin: First, stop the RabbitMQ service, using the command:
rabbitmqctl stop_app -n <nodename>

and then in the configuration file, usually available at

/etc/rabbitmq/rabbitmq.conf

add:

prometheus.authentication.enabled = true

Start the RabbitMQ service using the command:

rabbitmqctl start_app -n <nodename>
  • Check Prometheus Plugin Status for Each Node: If RabbitMQ is running as a cluster, check the status of each node individually to determine if the Prometheus plugin is enabled. Run the following command for each node:
sudo rabbitmq-plugins list -n <nodename> | grep Prometheus

Replace <nodename> with the name of each node.

  • Obtain Prometheus Endpoint and Port for Each Node: If the Prometheus plugin is enabled on any node, you can obtain the endpoint and port from the node status. Run the following command for each node and look for the Prometheus listener:
sudo rabbitmqctl status -n <nodename>

Review the output under the "Listeners" section to find the interface, port, and protocol for Prometheus.

  • Enable Prometheus Plugin for Each Node (If Necessary): If the Prometheus plugin is not enabled on any node, enable it using the following command for each node:
sudo rabbitmq-plugins enable prometheus -n <nodename>

Replace <nodename> with the name of each node.

  • Verify Prometheus Endpoint and Port for Each Node: After enabling the plugin (if necessary), repeat step 4 to ensure that the Prometheus endpoint and port are correctly configured for each node.

Configuration Steps

  • Enable the RabbitMQ O11ySource.
  • Select the Sources tab and press the + button to add a new RabbitMQ service to be monitored.
  • Provide the necessary details for integration:
  • *RabbitMQ Host (IP address)
  • *Credential for the RabbitMQ Management Plugin
  • *Details of the nodes: Node Address and Prometheus plugin port
  • Once the above details are provided, confirm the source configuration to begin receiving data into the system.

Metrics Collected

NameDescriptionData Type
TimestampTimestamp of telegraf agent collecting the metricsDateTime64(3)
Tenant IdTenant IdLowCardinality(String)
BU IdBusiness Unit IDLowCardinality(String)
Metric NameName of the metricString
Metric ValueValue of the metricFloat64
Metric TypeType of the metricString
TargetTarget AddressString
QueueQueue NameString
ExchangeExchangeString
URLURLString
VHostVirtual HostString
RabbitMQ NodeRabbitMQ NodeString
RabbitMQ ClusterRabbitMQ ClusterString
PeerPeer addressString
TableTable nameString
TagsTagsMap(LowCardinality(String), String)