The New Relic RabbitMQ on-host integration reports metrics and configuration data from your RabbitMQ service, including important metrics relating to the cluster, vhosts, queues, exchanges, and consumers.
Read on to install the integration, and to see what data we collect.
Compatibility and requirements
Our integration is compatible with:
- RabbitMQ version 3.0 or higher for Metric data.
- RabbitMQ version 3.7 or higher for Inventory data.
Before installing the integration, make sure that you meet the following requirements:
- RabbitMQ Management Plugin configured.
- RabbitMQ command line tool, rabbitmqctl, in the
PATH
of the root user. - If RabbitMQ is not running on Kubernetes or Amazon ECS, you must install the infrastructure agent on a host running RabbitMQ. Otherwise:
- If running on Kubernetes, see these requirements.
- If running on ECS, see these requirements.
Quick start
Instrument your RabbitMQ service quickly and send your telemetry data with guided install. Our guided install creates a customized CLI command for your environment that downloads and installs the New Relic CLI and the infrastructure agent.
Tip
If you're hosted in the EU, use our EU guided install.
Install and activate
To install the RabbitMQ integration, follow the instructions for your environment:
Additional notes:
- Advanced: Integrations are also available in tarball format to allow for install outside of a package manager.
- On-host integrations do not automatically update. For best results, regularly update the integration package and the infrastructure agent.
Important
This integration can monitor only one RabbitMQ server instance per host.
Configure the integration
An integration's YAML-format configuration is where you can place required login credentials and configure how data is collected. Which options you change depend on your setup and preference.
There are several ways to configure the integration, depending on how it was installed:
- If enabled via Kubernetes: see Monitor services running on Kubernetes.
- If enabled via Amazon ECS: see Monitor services running on ECS.
- If installed on-host: edit the config in the integration's YAML config file,
rabbitmq-config.yml
.
For an example configuration, see Example config file.
Important
With secrets management, you can configure on-host integrations with New Relic infrastructure's agent to use sensitive data (such as passwords) without having to write them as plain text into the integration's configuration file. For more information, see Secrets management.
Commands
The configuration provides three commands:
all
: collects all performance metric data, inventory (configuration) data, and event datainventory
: collects only inventory (configuration) dataevents
: collects only event data
Cluster environments
In cluster environments, only one node should use the all
command; the rest should use the inventory
command.
If you're running a cluster environment in Kubernetes, you need to deploy RabbitMQ as a StatefulSet, and configure the agent to query all the metrics from the RabbitMQ pod. Set the autodiscovery matching condition in the config file to this value:
discovery: command: exec: /var/db/newrelic-infra/nri-discovery-kubernetes match: podName: rabbitmq-0
Arguments
The integration accepts the following arguments:
hostname
: hostname or IP of the RabbitMQ management plugin. Default: localhost.port
: port number of the RabbitMQ management plugin. Default: 15672.username
: user that is connecting to RabbitMQ management plugin.password
: password to connect to RabbitMQ management plugin.use_ssl
: option to connect using SSL. Default: false.ca_bundle_dir/ca_bundle_file
: location of SSL certificate on the host.node_name_override
: overrides the local node name instead of retrieving it from RabbitMQ.config_path
: absolute path to the RabbitMQ configuration file.queues
: queue names to collect in the format of a JSON array of strings. If a queue name exactly matches (case sensitive) one of these, it will be collected.Example:
queues: '["myQueue1","myQueue2"]'queues_regexes
: queue names to collect in the format of a JSON array of REGEX strings. If a queue name matches one of these, it will be collected.Example:
queues_regexes: '["queue[0-9]+",".*"]'exchanges
: exchange names to collect in the format of a JSON array of strings. If an exchange name exactly matches (case sensitive) one of these, it will be collected.exchanges_regexes
: queue names to collect in the format of a JSON array of REGEX strings. If an exchange name matches one of these it will be collected.vhosts
: vhost names to collect in the format of a JSON array of strings. If a vhost name exactly matches (case sensitive) one of these, it will be included. This also affects only collecting entities belonging to vhosts specified.vhosts_regexes
: vhost names to collect in the format of a JSON array of REGEX strings. If a vhost name matches one of these the vhost and any entities belonging to this vhost will be collected.
Labels
Labels are optional, custom tags used to identify collections of data. For example:
env
: label to identify the environment. For example:production
.role
: label to identify which role is accessing the data.
Example configuration
Here's an example configuration file:
For more about the general structure of on-host integration configuration, see Configuration.
Find and use data
Data from this service is reported to an integration dashboard.
Metrics are attached to these event types:
You can query this data for troubleshooting purposes or to create custom charts and dashboards.
For more on how to find and use your data, see Understand integration data.
Metric data
The RabbitMQ integration collects the following metric data attributes. Each metric name is prefixed with a category indicator and a period, such as queue. or node..
RabbitMQ vhost sample event
These attributes are attached to the RabbitmqVhostSample
event type:
Name | Description |
---|---|
| Number of current connections in the state blocked. |
| Number of current connections in the state blocking. |
| Number of current connections in the state closed. |
| Number of current connections in the state closing. |
| Number of current connections in the state flow. |
vhost.connectionsOpening | Number of current connections in the state opening. |
vhost.connectionsRunning | Number of current connections in the state running. |
vhost.connectionsStarting | Number of current connections in the state starting. |
vhost.connectionsTotal | Number of current connections to a given rabbitmq vhost. |
vhost.connectionsTuning | Number of current connections in the state tuning. |
RabbitMQ node sample event
These attributes are attached to the RabbitmqNodeSample
event type:
Name | Description |
---|---|
node.averageErlangProcessesWaiting | Average number of Erlang processes waiting to run. In RabbitMQ this is seen as |
| Node disk alarm (0 or 1). 0 shows that the alarm is not tripped and 1 shows that the alarm is tripped. In RabbitMQ this is seen as |
| Current free disk space in bytes. In RabbitMQ this is seen as |
| The total count of file descriptors used. In RabbitMQ this is seen as |
| Number of file descriptors used as sockets. In RabbitMQ this is seen as |
| Host memory alarm (0 or 1). 0 shows that the alarm is not tripped and 1 shows that the alarm is tripped. In RabbitMQ this is seen as |
| Memory used in bytes. In RabbitMQ this is seen as |
| Number of network partitions seen per node. In RabbitMQ this is seen as |
| Node running (0 or 1). 0 shows that the node is not running and 1 shows that the node is running. In RabbitMQ this is seen as |
RabbitMQ exchange sample event
These attributes are attached to the RabbitmqExchangeSample
event type:
Name | Description |
---|---|
| Number of bindings for a specific exchange. |
| Count of messages delivered to clients and acknowledged per exchange. |
| Rate of messages delivered to clients and acknowledged per exchange per second. |
| Count of messages confirmed per exchange. |
| Rate of messages confirmed per exchange per second. |
| Count of subset of messages in deliver_get which had the redelivered flag set per queue. |
| Rate of subset of messages in deliver_get which had the redelivered flag set per queue per second. |
| Count of messages returned to publisher as unroutable per exchange. |
| Rate of messages returned to publisher as unroutable per exchange per second. |
| Count of messages published per exchange. |
| Rate of messages published per exchange queue per second. |
| Count of messages published from a channel into this exchange. In RabbitMQ this is seen as |
| Rate of messages published from a channel into this exchange per sec. In RabbitMQ this is seen as |
| Count of messages published from this exchange into a queue. In RabbitMQ this is seen as |
| Rate of messages published from this exchange into a queue per second. In RabbitMQ this is seen as |
RabbitMQ queue sample event
These attributes are attached to the RabbitmqQueueSample
event type:
Name | Description |
---|---|
| Number of bindings for a specific queue. |
| Number of active consumers that can immediately receive any messages sent to the queue. In RabbitMQ this is seen as |
| Number of consumers per queue. In RabbitMQ this is seen as consumers. |
| The ratio of time that a queue's consumers can take new messages (utilization per second). In RabbitMQ this is seen as This metric is only available on RabbitMQ version 3.3 or higher. |
| Bytes consumed by the Erlang process associated with the queue. In RabbitMQ this is seen as |
| Count of messages ready to be delivered to clients. In RabbitMQ this is seen as |
| Rate of messages ready to be delivered to clients per second. In RabbitMQ this is seen as |
| Count of messages per queue delivered to clients but not yet acknowledged. In RabbitMQ this is seen as |
| Rate of messages per queue delivered to clients but not yet acknowledged per second. In RabbitMQ this is seen as |
| Count of messages delivered to clients and acknowledged per queue. In RabbitMQ this is seen as |
| Rate of messages delivered to clients and acknowledged per second per queue. In RabbitMQ this is seen as |
| Count of messages delivered in acknowledgment mode to consumers per queue. In RabbitMQ this is seen as |
| Rate of messages delivered in acknowledgment mode to consumers per queue per second. In RabbitMQ this is seen as |
| Count of messages published per queue. In RabbitMQ this is seen as |
| Rate of messages published per second per queue. In RabbitMQ this is seen as |
| Count of subset of messages in acknowledgment mode which had the redelivered flag set per queue. In RabbitMQ this is seen as |
| Rate of subset of messages in acknowledgment mode which had the redelivered flag set per queue per second. In RabbitMQ this is seen as |
| Sum of messages delivered in acknowledgment mode to consumers, in no-acknowledgment mode to consumers, in acknowledgment mode in response to basic.get, and in no-acknowledgment mode in response to basic.get. per queue. In RabbitMQ this is seen as |
| Rate per second of the sum of messages delivered in acknowledgment mode to consumers, in no-acknowledgment mode to consumers, in acknowledgment mode in response to basic.get, and in no-acknowledgment mode in response to basic.get per queue. In RabbitMQ this is seen as |
| Count of the total messages in the queue. In RabbitMQ this is seen as |
| Rate of total messages in queue. In RabbitMQ this is seen as |
System metadata
Other metadata includes:
Name | Description |
---|---|
| The version of the RabbitMQ server. Example: 3.6.7. |
| The version of the RabbitMQ management plugin. For example: 3.6.7. |
Inventory data
The integration captures the configuration parameters of RabbitMQ in the /etc/rabbitmq/rabbitmq.conf
file. Inventory data is only captured in RabbitMQ version 3.7 or higher; the inventory data will appear on the Infrastructure Inventory page, under the config/rabbitmq
source.
Caution
Be aware that any sensitive information that you put into the rabbit.conf
file will appear on the Infrastructure Inventory page. This includes items such as the following from AWS:
cluster_formation.aws.secret_key, cluster_formation.aws.access_key_id
Troubleshooting
Troubleshooting tips:
Check the source code
This integration is open source software. That means you can browse its source code and send improvements, or create your own fork and build it.