• /
  • EnglishEspañol日本語한국어Português
  • EntrarComeçar agora

RabbitMQ monitoring integration

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.

Importante

This integration can monitor only one RabbitMQ server instance per host.

Importante

This integration doesn't automatically update. For best results, regularly update the integration package and the infrastructure agent.

Configuration options

For the standard on-host installation, this integration comes with a YAML config file, rabbitmq-config.yml. This configuration is where you can place required login credentials and configure how data is collected. Which options you change depends on your setup and preferences. It comes with a sample config file rabbitmq-log.yml.example that you can copy and edit.

The configuration file has common settings applicable to all integrations like interval, timeout, inventory_source.

Importante

To read all about common settings or if you're still using our Legacy configuration or definition files, please go to our On-host integrations: Standard configuration format document.

Specific settings related to RabbitMQ are defined using the env section of the configuration file. These settings control the connection to your RabbitMQ instance as well as other security settings and features. The next section of this document describes the list of valid settings.

Cluster environments

In cluster environments, the integration collects metrics from all the cluster with only one instance of the integration connected to one node. This instance should use METRICS=true and INVENTORY=true. For the rest of the nodes only Inventory should be collected using METRICS=false and INVENTORY=true. For more on these, see instance settings.

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

Importante

The integration restricts the collection of queues to a certain number. If the number of queues exceeds 2000, after the application of queue filters, the integration won't report any of them. We offer a workaround that will preserve all metrics, but it will disable entity registration. To apply the workaround, add the following environment variable to the configuration file:

integrations:
- name: nri-rabbitmq
env:
# Integration configuration parameters.
METRICS: true
DISABLE_ENTITIES: true
QUEUES_MAX_LIMIT: "0"

RabbitMQ instance settings

The RabbitMQ integration collects both Metrics(M) and Inventory(I) information. Check the Applies To column below to find which settings can be used for each specific collection:

Setting

Description

Default

Applies To

HOSTNAME

Hostname or IP of the RabbitMQ management plugin.

localhost

M/I

PORT

Port number of the RabbitMQ management plugin.

15672

M/I

USERNAME

User that is connecting to RabbitMQ management plugin.

N/A

M/I

PASSWORD

Password to connect to RabbitMQ management plugin.

N/A

M/I

TIMEOUT

Timeout in seconds to timeout the connection to RabbitMQ endpoint.

30

M/I

MANAGEMENT_PATH_PREFIX

RabbitMQ Management Prefix.

N/A

M/I

USE_SSL

Option to connect using SSL.

false

M/I

CA_BUNDLE_DIR

Location of SSL certificate on the host.

N/A

M/I

CA_BUNDLE_FILE

Location of SSL certificate on the host.

N/A

M/I

NODE_NAME_OVERRIDE

Overrides the local node name instead of retrieving it from RabbitMQ.

N/A

M/I

CONFIG_PATH

Absolute path to the RabbitMQ configuration file.

N/A

M/I

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"]'

N/A

I

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]+",".*"]'

N/A

M/I

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.

N/A

M/I

EXCHANGES_REGEXES

Exchanges 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.

N/A

M/I

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.

N/A

M/I

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.

N/A

M/I

METRICS

Set to true to enable Metrics-only collection.

false

INVENTORY

Set to true to enable Inventory-only collection.

false

EVENTS

Set to true to enable Events-only collection.

false

DISABLE_ENTITIES

Configure whether inventory entries are created for entities during metrics collection. Only to be used as workaround to collect large amounts of Queues.

false

QUEUES_MAX_LIMIT

Defines the max amount of Queues that can be processed, if this number is reached all queues will be dropped. If defined as 0 no limits are applied, this used with DISABLE_ENTITIES=true to avoid, memory increase in the Agent.

2000

The values for these settings can be defined in several ways:

  • Adding the value directly in the config file. This is the most common way.
  • Replacing the values from environment variables using the {{}} notation. This requires infrastructure agent v1.14.0+. Read more here.
  • Using Secrets management. Use this to protect sensible information such as passwords to be exposed in plain text on the configuration file. For more information, see Secrets management.

Labels/Custom Attributes

Environment variables can be used to control config settings, such as your , and are then passed through to the infrastructure agent. For instructions on how to use this feature, see Configure the infrastructure agent. You can further decorate your metrics using labels. Labels allow you to add key/value pairs attributes to your metrics which you can then use to query, filter or group your metrics on.
Our default sample config file includes examples of labels but, as they are not mandatory, you can remove, modify, or add new ones of your choice.

labels:
env: production
role: rabbitmq

Example configuration

Examples of the configuration file:

See On-host integration configuration overview to know more about the general structure of on-host integration configuration.

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

vhost.connectionsBlocked

Number of current connections in the state blocked.

vhost.connectionsBlocking

Number of current connections in the state blocking.

vhost.connectionsClosed

Number of current connections in the state closed.

vhost.connectionsClosing

Number of current connections in the state closing.

vhost.connectionsFlow

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 run_queue.

node.diskAlarm

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 disk_free_alarm.

node.diskSpaceFreeInBytes

Current free disk space in bytes. In RabbitMQ this is seen as disk_free.

node.fileDescriptorsTotal

The total count of file descriptors. In RabbitMQ this is seen as fd_total.

node.fileDescriptorsTotalUsed

The total count of file descriptors used. In RabbitMQ this is seen as fd_used.

node.fileDescriptorsUsedSockets

Number of file descriptors used as sockets. In RabbitMQ this is seen as sockets_used.

node.fileDescriptorsTotalSockets

Total number of file descriptors available as sockets. In RabbitMQ this is seen as sockets_total.

node.hostMemoryAlarm

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 mem_alarm.

node.totalMemoryUsedInBytes

Memory used in bytes. In RabbitMQ this is seen as mem_used.

node.partitionsSeen

Number of network partitions seen per node. In RabbitMQ this is seen as partitions.

node.processesTotal

Erlang process limit. In RabbitMQ this is seen as proc_total.

node.processesUsed

Erlang processes used. In RabbitMQ this is seen as proc_used.

node.running

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 running.

RabbitMQ exchange sample event

These attributes are attached to the RabbitmqExchangeSample event type:

Name

Description

exchange.bindings

Number of bindings for a specific exchange.

exchange.messagesPublishedPerChannel

Count of messages published from a channel into this exchange. In RabbitMQ this is seen as message_stats.publish_in.

exchange.messagesPublishedPerChannelPerSecond

Rate of messages published from a channel into this exchange per sec. In RabbitMQ this is seen as message_stats.publish_in_details.rate.

exchange.messagesPublishedQueue

Count of messages published from this exchange into a queue. In RabbitMQ this is seen as message_stats.publish_out.

exchange.messagesPublishedQueuePerSecond

Rate of messages published from this exchange into a queue per second. In RabbitMQ this is seen as message_stats.publish_out_details.rate.

RabbitMQ queue sample event

These attributes are attached to the RabbitmqQueueSample event type:

Name

Description

queue.bindings

Number of bindings for a specific queue.

queue.countActiveConsumersReceiveMessages

Number of active consumers that can immediately receive any messages sent to the queue. In RabbitMQ this is seen as active_consumers.

queue.consumers

Number of consumers per queue. In RabbitMQ this is seen as consumers.

queue.consumerMessageUtilizationPerSecond

The ratio of time that a queue's consumers can take new messages (utilization per second). In RabbitMQ this is seen as consumer_utilisation.

This metric is only available on RabbitMQ version 3.3 or higher.

queue.erlangBytesConsumedInBytes

Bytes consumed by the Erlang process associated with the queue. In RabbitMQ this is seen as memory.

queue.messagesReadyDeliveryClients

Count of messages ready to be delivered to clients. In RabbitMQ this is seen as message_stats.messages_ready.

queue.messagesReadyDeliveryClientsPerSecond

Rate of messages ready to be delivered to clients per second. In RabbitMQ this is seen as message_stats.messages_ready_details.rate.

queue.messagesReadyUnacknowledged

Count of messages per queue delivered to clients but not yet acknowledged. In RabbitMQ this is seen as message_stats.deliver_no_ack.

queue.messagesReadyUnacknowledgedPerSecond

Rate of messages per queue delivered to clients but not yet acknowledged per second. In RabbitMQ this is seen as message_stats.deliver_no_ack_details.rate.

queue.messagesAcknowledged

Count of messages delivered to clients and acknowledged per queue. In RabbitMQ this is seen as message_stats.ack.

queue.messagesAcknowledgedPerSecond

Rate of messages delivered to clients and acknowledged per second per queue. In RabbitMQ this is seen as message_stats.ack_details.rate.

queue.messagesDeliveredAckMode

Count of messages delivered in acknowledgment mode to consumers per queue. In RabbitMQ this is seen as message_stats.deliver.

queue.messagesDeliveredAckModePerSecond

Rate of messages delivered in acknowledgment mode to consumers per queue per second. In RabbitMQ this is seen as message_stats.deliver_details.rate.

queue.messagesPublished

Count of messages published per queue. In RabbitMQ this is seen as message_stats.publish.

queue.messagesPublishedPerSecond

Rate of messages published per second per queue. In RabbitMQ this is seen as message_stats.publish_details.rate.

queue.messagesRedeliverGet

Count of subset of messages in acknowledgment mode which had the redelivered flag set per queue. In RabbitMQ this is seen as message_stats.redeliver.

queue.messagesRedeliverGetPerSecond

Rate of subset of messages in acknowledgment mode which had the redelivered flag set per queue per second. In RabbitMQ this is seen as message_stats.redeliver_details.rate.

queue.sumMessagesDelivered

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 message_stats.deliver_get.

queue.sumMessagesDeliveredPerSecond

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 message_stats.deliver_get_details.rate.

queue.totalMessages

Count of the total messages in the queue. In RabbitMQ this is seen as messages.

queue.totalMessagesPerSecond

Rate of total messages in queue. In RabbitMQ this is seen as messages_details.rate.

System metadata

Other metadata includes:

Name

Description

version.rabbitmq

The version of the RabbitMQ server. Example: 3.6.7.

version.management

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 Inventory page in the infrastructure UI, under the config/rabbitmq source.

Cuidado

Be aware that any sensitive information that you put into the rabbit.conf file will appear on the Inventory page in the infrastructure UI. 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.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.