Documentation forAppOptics

RabbitMQ

Overview

This plugin collects metrics directly from the rabbitmq management API. The plugin requests the machine-readable content from this endpoint and parses metrics out from the retrieved data.

Setup

The rabbitmq plugin is included with the SolarWinds Snap Agent by default, please follow the directions below to enable it for an agent instance.

Prerequisites

This plugin requires both an enabled management plugin and the corresponding management API connection credentials to monitor. The links below outline how this can be configured for a given rabbitmq instance:

The recommended rabbitmq version is v3.7.0+, but this plugin does support both legacy and current installations. Note that there are breaking changes to the management API from v3.7.0, which precludes collection of certain metrics. These are outlined in the Metrics and Tags section further below.

Configuration

The agent provides an example configuration file to help you get started quickly. It defines the plugin and task file to be loaded by the agent, but requires you to provide the correct settings for your management API endpoint. To enable the plugin:

  1. Make a copy of the rabbitmq example configuration file /opt/SolarWinds/Snap/etc/plugins.d/rabbitmq.yaml.example, renaming it to /opt/SolarWinds/Snap/etc/plugins.d/rabbitmq.yaml:

    sudo cp -p /opt/SolarWinds/Snap/etc/plugins.d/rabbitmq.yaml.example /opt/SolarWinds/Snap/etc/plugins.d/rabbitmq.yaml
  2. Update the /opt/SolarWinds/Snap/etc/plugins.d/rabbitmq.yaml configuration file with settings specific to your rabbitmq instance, for example:

    collector:
      rabbitmq:
        all:
          url: "http://localhost:15672"
          user: "guest"
          password: "guest"
          autorecover: false
          collect-system-exchanges: false
          interval: "60s"
    load:
      plugin: snap-plugin-collector-aorabbitmq
      task: task-aorabbitmq.yaml

    The url, user, and password flags are required to call RabbitMQ Management API. The user must be assigned to the Monitoring tag. See Access and Permissions from RabbitMQ Management Plugin documentation for more information. This can be done via command line:

    rabbitmqctl add_user <username> <password>
    rabbitmqctl set_user_tags <username> monitoring

    The interval sets time interval between subsequent metrics submissions (optional, by default set to 60s).

    If node (pointed by "url") is broken plugin may try to discover other nodes in cluster with management plugin enabled (using the same user and password) and get information from first node applicable (autorecover option).

    Parameter collect-system-exchanges determines if plugin should collect metrics related to rabbitMq system exchanges (amq.*).

    Additionally, you'll want to set the management process to enable detailed for rates_mode which will make verbose information available to the plugin.

    sudo rabbitmqctl eval 'application:set_env(rabbitmq_management, rates_mode, detailed).'
  3. Restart the agent:

    sudo service swisnapd restart
  4. Enable the RabbitMQ plugin in the AppOptics UI

    On the Integrations Page you will see the RabbitMQ plugin available if the previous steps were successful. If you do not see the plugin, see Troubleshooting Linux.

    Select the RabbitMQ plugin to open the configuration menu in the UI, and enable the plugin.

    You should soon see the rabbitmq metrics reported to your dashboard.

Metrics and Tags

The tables below outline the default set of metrics collected by the rabbitmq plugin along with the optional metrics available.

Default Metrics

Namespace Description
rabbitmq.exchanges.message_stats.publish_in count of messages published "in" to an exchange
rabbitmq.exchanges.message_stats.publish_in_details.rate change per second of the publish_in counter
rabbitmq.exchanges.message_stats.publish_out ount of messages published "out" of an exchange
rabbitmq.exchanges.message_stats.publish_out_details.rate change per second of the publish_out counter
rabbitmq.nodes.fd_used used file descriptors
rabbitmq.nodes.mem_used bytes of memory consumed by node processes
rabbitmq.nodes.memory.connection_channels bytes consumed by connection channels 1
rabbitmq.nodes.memory.mgmt_db bytes consumed by the management database 1
rabbitmq.nodes.memory.total.allocated total amount as reported by the effective memory calculation strategy (bytes)
rabbitmq.nodes.proc_used number of processes used by nodes
rabbitmq.nodes.sockets_used number of socket file descriptors used
rabbitmq.queues.consumers number of queue consumers (total count)
rabbitmq.queues.memory bytes of memory consumed by the Erlang process associated with the queue, including stack, heap and internal structures
rabbitmq.queues.message_stats.publish count of messages published
rabbitmq.queues.message_stats.publish_details.rate change per second of the publish counter
rabbitmq.queues.messages sum of ready and unacknowledged messages (queue depth)
rabbitmq.queues.messages_details.rate change per second of the messages counter
rabbitmq.queues.messages_ready number of messages ready to be delivered to clients
rabbitmq.queues.messages_ready_details.rate change per second of the messages_ready counter
rabbitmq.queues.messages_unacknowledged number of messages delivered to clients but not yet acknowledged
rabbitmq.queues.messages_unacknowledged_details.rate change per second of the messages_unacknowledged counter
rabbitmq.vhosts.message_stats.publish count of messages published
rabbitmq.vhosts.message_stats.publish_details.rate change per second of the publish counter
rabbitmq.vhosts.messages sum of ready and unacknowledged messages (queue depth)
rabbitmq.vhosts.messages_ready number of messages ready to be delivered to clients
rabbitmq.vhosts.messages_ready_details.rate change per second of the messages_ready counter
rabbitmq.vhosts.messages_unacknowledged number of messages delivered to clients but not yet acknowledged
rabbitmq.vhosts.messages_unacknowledged_details.rate change per second of the messages_unacknowledged counter

Optional Metrics

Namespace Description
rabbitmq.exchanges.message_stats.confirm count of messages confirmed
rabbitmq.exchanges.message_stats.confirm_details.rate change per second of the confirm counter
rabbitmq.nodes.disk_free disk free space in bytes
rabbitmq.nodes.disk_free_details.rate change per second of the disk_free counter
rabbitmq.nodes.fd_used_details.rate change per second of the fd_used counter
rabbitmq.nodes.io_read_avg_time avg wall time (milliseconds) for each disk read operation in the last statistics interval
rabbitmq.nodes.io_read_avg_time_details.rate change per second of the io_read_avg_time counter
rabbitmq.nodes.io_read_bytes total number of bytes read from disk by the persister
rabbitmq.nodes.io_read_bytes_details.rate change per second of the io_read_bytes counter
rabbitmq.nodes.io_read_count total number of read operations by the persister
rabbitmq.nodes.io_read_count_details.rate change per second of the io_read_count counter
rabbitmq.nodes.io_seek_avg_time average wall time (milliseconds) for each seek operation in the last statistics interval
rabbitmq.nodes.io_seek_avg_time_details.rate change per second of the io_seek_avg_time counter
rabbitmq.nodes.io_seek_count total number of seek operations by the persister
rabbitmq.nodes.io_seek_count_details.rate change per second of the io_seek_count counter
rabbitmq.nodes.io_sync_avg_time average wall time (milliseconds) for each fsync() operation in the last statistics interval
rabbitmq.nodes.io_sync_avg_time_details.rate change per second of the io_sync_avg_time
rabbitmq.nodes.io_sync_count total number of fsync() operations by the persister
rabbitmq.nodes.io_sync_count_details.rate change per second of the io_sync_count counter
rabbitmq.nodes.io_write_avg_time average wall time (milliseconds) for each disk write operation in the last statistics interval
rabbitmq.nodes.io_write_avg_time_details.rate change per second of the io_write_avg_time counter
rabbitmq.nodes.io_write_bytes total number of bytes written to disk by the persister
rabbitmq.nodes.io_write_bytes_details.rate change per second of the io_write_bytes counter
rabbitmq.nodes.io_write_count total number of write operations by the persister
rabbitmq.nodes.io_write_count_details.rate change per second of the io_write_count counter
rabbitmq.nodes.mem_used_details.rate change per second of the mem_used counter
rabbitmq.nodes.memory.atom bytes consumed by atom processes 1
rabbitmq.nodes.memory.binary bytes consumed by the runtime binary heap 1
rabbitmq.nodes.memory.code bytes consumed by bytecode and module metadata 1
rabbitmq.nodes.memory.connection_other bytes consumed by client connections 1
rabbitmq.nodes.memory.connection_readers bytes consumed by processes responsible for connection parser and most of connection state 1
rabbitmq.nodes.memory.connection_writers bytes consumed by processes responsible for serialisation of outgoing protocol frames and writing to client connection sockets 1
rabbitmq.nodes.memory.mnesia bytes consumed by virtual hosts, users, permissions, queue metadata and state, exchanges, bindings, runtime parameters 1
rabbitmq.nodes.memory.msg_index bytes consumed by the message index 1
rabbitmq.nodes.memory.other_ets bytes consumed by other in-memory tables besides those belonging to stats and internal databases 1
rabbitmq.nodes.memory.other_proc bytes consumed by other in-memory processes 1
rabbitmq.nodes.memory.other_system bytes consumed by other in-memory system processes 1
rabbitmq.nodes.memory.plugins bytes consumed by all rabbitmq plugins 1
rabbitmq.nodes.memory.queue_procs bytes consumed by queue masters, indices and messages kept in memory 1
rabbitmq.nodes.memory.queue_slave_procs bytes consumed by queue mirrors, indices and messages kept in memory 1
rabbitmq.nodes.memory.total.erlang total amount as reported by the erlang (lagacy) memory calculation strategy (bytes)
rabbitmq.nodes.memory.total.rss total amount as reported by the rss memory calculation strategy (bytes)
rabbitmq.nodes.mnesia_disk_tx_count number of Mnesia transactions which have been performed that required writes to disk
rabbitmq.nodes.mnesia_disk_tx_count_details.rate change per second of the mnesia_disk_tx_count counter
rabbitmq.nodes.mnesia_ram_tx_count number of Mnesia transactions which have been performed that did not require writes to disk
rabbitmq.nodes.mnesia_ram_tx_count_details.rate change per second of the mnesia_ram_tx_count counter
rabbitmq.nodes.proc_used_details.rate change per second of the proc_used counter
rabbitmq.nodes.queue_index_read_count number of records read from the queue index
rabbitmq.nodes.queue_index_read_count_details.rate change per second of the queue_index_read_count counter
rabbitmq.nodes.queue_index_write_count number of records written to the queue index
rabbitmq.nodes.queue_index_write_count_details.rate change per second of the queue_index_write_count counter
rabbitmq.nodes.sockets_used_details.rate change per second of the sockets_used counter
rabbitmq.queues.disk_reads total number of times messages have been read from disk by this queue since it started
rabbitmq.queues.disk_writes total number of times messages have been written to disk by this queue since it started
rabbitmq.queues.message_bytes sum of the size of all message bodies in the queue (bytes)
rabbitmq.queues.message_bytes_persistent like message_bytes but counting only those messages which are persistent
rabbitmq.queues.message_bytes_ram like message_bytes but counting only those messages which are in RAM
rabbitmq.queues.message_bytes_ready like message_bytes but counting only those messages ready to be delivered to clients
rabbitmq.queues.message_bytes_unacknowledged like message_bytes but counting only those messages delivered to clients but not yet acknowledged
rabbitmq.queues.message_stats.disk_reads total number of times messages have been read from disk by this queue since it started
rabbitmq.queues.message_stats.disk_reads_details.rate change per second of the disk_reads counter
rabbitmq.queues.messages_persistent total number of persistent messages in the queue (will always be 0 for transient queues)
rabbitmq.queues.messages_ram total number of messages which are resident in ram
rabbitmq.queues.messages_ready_ram number of messages from messages_ready which are resident in ram
rabbitmq.queues.messages_unacknowledged_ram number of messages from messages_unacknowledged which are resident in ram
rabbitmq.vhosts.message_stats.confirm count of messages confirmed
rabbitmq.vhosts.message_stats.confirm_details.rate change per second of the confirm counter
rabbitmq.vhosts.message_stats.deliver_get sum of deliver, deliver_no_ack, get and get_no_ack counters
rabbitmq.vhosts.message_stats.deliver_get_details.rate change per second of deliver_get counter
rabbitmq.vhosts.message_stats.get_no_ack count of messages delivered in no-acknowledgement mode in response to basic.get
rabbitmq.vhosts.message_stats.get_no_ack_details.rate change per second of get_no_ack counter
rabbitmq.vhosts.messages_acknowledged sum of all messages_acknowledged fields for all queues in vhost
rabbitmq.vhosts.messages_acknowledged_details.rate rate of all messages_acknowledged fields for all queues in vhost
rabbitmq.vhosts.messages_details.rate rate of messages for all queues in vhost

1 RabbitMQ v3.7.0+ breaking changes to memory use API

Navigation Notice: When the APM Integrated Experience is enabled, AppOptics shares a common navigation and enhanced feature set with other integrated experience products. How you navigate AppOptics and access its features may vary from these instructions.

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.