Pivotal Knowledge Base

Follow

How to Collect Information using rabbitmq_top

Environment

  • Pivotal RabbitMQ 3.6.3 and above
  • RabbitMQ for Pivotal Cloud Foundry

Purpose

This article demonstrates how to collect top utilizations on a RabbitMQ server. You can check the top utilization of RabbitMQ Management Dashboard or run API calls to collect consumption for further analysis.

There is a pre-installed plugin rabbitmq_top starting RabbitMQ server version 3.6.3.

Procedure

Make sure the rabbitmq_top plugin is enabled:

1. Login to RabbitMQ server node.

2. For PCF RabbitMQ, make sure the environment variables are set correctly:

export PATH=$PATH:/var/vcap/packages/rabbitmq-server/bin:/var/vcap/packages/erlang/bin

3. Run this command to make sure the plugin is enabled:

rabbitmq-plugins list

The desired output for rabbitmq_top is: [E*] rabbitmq_top 3.7.3

4. If the rabbitmq_top plugin is not enabled, enable the plugin using this command:

rabbitmq-plugins enable rabbitmq_top

The RabbitMQ Top utilization can be reviewed in two ways:

  1. Management GUI
  2. HTTP API can be used to collect the processes utilizations for analysis

Management GUI

To view top utilization on the RabbitMQ Management GUI, follow these steps:

1. Login to Management GUI as cluster admin user

2. Click the Admin tab

3. Click the Top Processes tab in the right pane

4. You can sort the processes by Memory or Reductions (See Figure 1)

Figure 1

Screen_Shot_2018-03-29_at_11.29.42_AM.png

5. You can click any running process to see more details (See Figure 2)

Figure 2 

Screen_Shot_2018-03-29_at_11.33.07_AM.png

HTTP API Use

To collect the process utilization info for further analysis, we can use HTTP API:

1. SSH to RabbitMQ server node

2. Run the below command to collect the full process utilization on this RabbitMQ server:

curl -s -u <username>:<password> http://<IP_of_RabbitMQ>:15672/api/top/<node-name> -k | python -m json.tool > rabbitmq_top.out

For example:

curl -s -u admin:password1 http://10.10.10.11:15672/api/top/rabbit@rmq-node -k | python -m json.tool > rabbitmq_top.out

Additional Information

If there are multiple RabbitMQ nodes in the cluster, we need to collect the information for individual node separately.

If you are running an older version than 3.6.3, the rabbitmq_top plugin can be downloaded here.

Follow this link to Install Additional Plugins on RabbitMQ server.

Comments

Powered by Zendesk