RabbitMQ Monitoring

Last updated on 20 January, 2020

The following article will walk you through setting up RabbitMQ monitoring. LogicMonitor is fully equipped to gather both node performance and queue statistics of the RabbitMQ server. 

To get started, you will need to set the following properties on your RabbitMQ device or group in LogicMonitor: 

  • rabbitmq.user=[your RabbitMQ username]
  • rabbitmq.pass=[your RabbitMQ password]
  • rabbitmq.port=15672
  • rabbitmq.apiurl=[your RabbitMQ API URL]
  • system.categories includes “RabbitMQ”

The first four properties listed above can be defined using the following commands:

  • def rabbitPort = hostProps.get(“rabbitmq.port”);
  • def rabbitUser = hostProps.get(“rabbitmq.user”);
  • def rabbitPass = hostProps.get(“rabbitmq.pass”);
  • def rabbitAddr = hostProps.get(“rabbitmq.apiurl”);

Next, the updated user that was added above needs to have monitoring priveleges enabled. To do this, enter the following command line in your RabbitMQ terminal:

   sudo rabbitmqctl set_user_tags monitoring

If running RabbitMQ in AWS EC2, you will also need to add the following management plugin listed on RabbitMQ’s support site, here. After completing these steps from RabbitMQ, enter the following command to enable the management plugin: 

   rabbitmq-plugins enable rabbitmq_management

Finally, you will need to make sure that the inbound/outbound rules for Port 15672 are configured to allow Collector access. Please note that, by default, the RabbitMQ port is 5672 but its management is performed via 15672. As such, the latter is required for Collector access.