The rabbitmq-management plugin provides an HTTP-based API for management and monitoring of your RabbitMQ server, along with a browser-based UI and an experimental command line tool, rabbitmqadmin. Features include:
The simplest way to obtain the management plugin is to download the binary packages from the plugins page and copy them to your plugins directory. See the plugins page for more details.
If you wish to build the plugin from source, it can be built like any other. See the plugin development page or the BUILDING file for more information, but be aware that it seems to be problematic to build rabbitmq-mochiweb on Windows.
rabbitmq-management uses the Mochiweb web server which requires a newer Erlang version. At least R13B01 is required, but later versions are recommended.
To use the web UI you will need to authenticate as a RabbitMQ user (on a fresh installation the user "guest" is created with password "guest"). From here you can manage exchanges, queues, bindings, virtual hosts, users and permissions. Hopefully the UI is fairly self-explanatory.
The management UI is implemented as a single static HTML page which makes background queries to the HTTP API. As such it makes heavy use of Javascript. It has been tested with recent versions of Firefox, Chromium and Safari, and with versions of Microsoft Internet Explorer back to 6.0.
The management plugin extends the existing permissions model somewhat. Users can be marked as "administrators". Only administrators can view or edit users, virtual hosts or permissions at all. Furthermore, only administrators can see details of other users' connections and channels (and close such connections), as well as node-level data such as memory use and clustering.
Normal RabbitMQ permissions still apply to administrators; just because a user is an administrator does not give them full access to exchanges, queues and bindings through either AMQP or the management plugin.
All users, administrators or otherwise, can only list objects within a particular virtual host if they have any permissions for that virtual host. Non-administrators however cannot even see the existence of virtual hosts they do not have permissions for, and will not see messages in those virtual hosts counting towards their "global" message rates.
The management plugin has a couple of configuration options. These are managed through the main RabbitMQ configuration file.
The message rates shown by the management plugin require fine-grained statistics to be enabled in the server. This will have a performance impact on a CPU-bound server; typically message throughput can be reduced by 5-10%. For ease of use, the management plugin will automatically enable fine-grained statistics when it is installed.
However, if you'd rather get the throughput than the statistics, you can prevent this from happening. Set the value of the force_fine_statistics variable to false in your configuration file for the rabbit_management_agent application and restart RabbitMQ.
To create simple access logs of requests to the HTTP API, set the value of the http_log_dir variable in the rabbit_management application to the name of a directory in which logs can be created and restart RabbitMQ. Note that only requests to the API at /api are logged, not requests to the static files which make up the browser-based GUI.
An example configuration file for RabbitMQ that switches on request logging, and explicitly sets some other relevant parameters to their default values, would look like this:
[
{rabbit, [ {tcp_listeners, [5672]} ] },
{rabbit_mochiweb, [ {port, 55672} ] },
{rabbit_management, [ {http_log_dir, "/tmp/rabbit-mgmt"} ] },
{rabbit_management_agent, [ {force_fine_statistics, true} ] }
].
The management plugin is aware of clusters. You can install it on one or more nodes in a cluster, and see information pertaining to the entire cluster no matter which node you connect to.
If you want to deploy cluster nodes which do not have the full management plugin installed, they will still require the rabbitmq-management-agent plugin. This can be obtained from the plugins page.
The managment plugin installs a statistics database into RabbitMQ to keep track of queue length, message rates, etc. In a RabbitMQ cluster there will only be one copy of the statistics database, located in the first node to come up that has the full management plugin installed. If that node subsequently goes down then statistics information (queue sizes, message rates) will be missing.
The management plugin will create an HTTP-based API at http://server-name:55672/api/. Browse to that location for more information on the API. For convenience the documentation can also be obtained from our Mercurial server.