• /
  • ログイン

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.

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:

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.

A screenshot of the guided install CLI.

Ready to get started? Click one of these button to try it out.

Guided install

Our guided install uses the infrastructure agent to set up the RabbitMQ integration. Not only that, it discovers other applications and log sources running in your environment and then recommends which ones you should instrument.

The guided install works with most setups. But if it doesn't suit your needs, you can find other methods below to get started monitoring your RabbitMQ service.

Install and activate

To install the RabbitMQ integration, follow the instructions for your environment:

Additional notes:

重要

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:

For an example configuration, see Example config file.

The configuration file has common settings applicable to all integrations like interval, timeout, inventory_source. To read all about these common settings refer to our Configuration Format document.

重要

If you are still using our Legacy configuration/definition files please refer to this document for help.

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 list of valid settings is described in the next section of this document.

Cluster environments

In cluster environments, only one node should use METRICS=false and INVENTORY=false ; the rest should use INVENTORY=true and METRICS=false.

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

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

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

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 license key, 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

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

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

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

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

Count of messages delivered to clients and acknowledged per exchange.

exchange.messagesDeliveredAcknowledgedPerSecond

Rate of messages delivered to clients and acknowledged per exchange per second.

exchange.messagesConfirmed

Count of messages confirmed per exchange.

exchange.messagesConfirmedPerSecond

Rate of messages confirmed per exchange per second.

exchange.messagesRedelivered

Count of subset of messages in deliver_get which had the redelivered flag set per queue.

exchange.messagesRedeliveredPerSecond

Rate of subset of messages in deliver_get which had the redelivered flag set per queue per second.

exchange.messagesReturnedUnroutable

Count of messages returned to publisher as unroutable per exchange.

exchange.messagesReturnedUnroutablePerSecond

Rate of messages returned to publisher as unroutable per exchange per second.

exchange.messagesPublished

Count of messages published per exchange.

exchange.messagesPublishedPerSecond

Rate of messages published per exchange queue per second.

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

注意

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.

For more help

その他のヘルプ

さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:

問題を作成するこのページを編集する
Copyright © 2020 New Relic Inc.