David Mytton
posted this on Jan 29 16:07
The agent can parse the output of the rabbitmq-status plugin to show the current status of RabbitMQ connections as well as individual metrics for queues. These metrics are only available for paid accounts. It also requires some additional configuration of your RabbitMQ installation.
If you do not wish to monitor RabbitMQ then leave the default value in the /etc/sd-agent/config.cfgfile and the agent will ignore it.
1) a) Configuring RabbitMQ 1.7.x and 1.8.x
rabbitmq-status plugin
You first need to ensure the rabbitmq-status plugin is installed. This is not available by default and must be installed separately:
wget http://dev.lshift.net/majek/rabbitmq-status_1.7.0.tar.gz tar xvzf rabbitmq-status_1.7.0.tar.gz sudo mkdir /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.0/plugins sudo mv *.ez /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.0/plugins sudo rabbitmq-activate-plugins sudo /etc/init.d/rabbitmq-server restart
This has been tested on RabbitMQ versions 1.7.0, 1.7.1, and 1.7.2.
1) b) Configuring RabbitMQ 2.x
rabbitmq-management
Install the RabbitMQ management plugin, rabbitmq-management. Detailed installation instructions for it are available here.
This has been tested on RabbitMQ version 2.2.0.
2) a) Agent configuration (RabbitMQ 1.7.x and 1.8.x)
You need to enter the URL into the agent /etc/sd-agent/config.cfg file for the rabbitmq_status_urloption. If your server's IP is 127.0.0.1 then this URL would be http://127.0.0.1:55672/json.
rabbitmq_status_url: http://127.0.0.1:55672/json rabbitmq_user: guest rabbitmq_pass: guest
2) b) Agent configuration (RabbitMQ 2.x)
You need to enter the URL into the agent /etc/sd-agent/config.cfg file for the rabbitmq_status_urloption. If your server's IP is 127.0.0.1 then this URL would be http://127.0.0.1:55672/api/overview.
rabbitmq_status_url: http://127.0.0.1:55672/api/overview rabbitmq_user: guest rabbitmq_pass: guest
3) Restart agent
Restart the agent to start the monitoring, which will take up to 5 minutes to show in the Server Density UI.