ApsaraMQ for RabbitMQ can integrate with Managed Service for Prometheus and Managed Service for Grafana of Application Real-Time Monitoring Service (ARMS) to provide the dashboard feature. Managed Service for Prometheus is used to monitor metrics and Managed Service for Grafana is used to store and display metrics. You can use the dashboard feature of ApsaraMQ for RabbitMQ to view various metrics of Enterprise Edition and Enterprise Platinum Edition instances, vhosts, queues, and exchanges. This way, you can troubleshoot issues at the earliest opportunity. This topic describes the metrics provided by the dashboard feature and how to use the metrics.
Billing
Metrics that are displayed on the dashboard of ApsaraMQ for RabbitMQ are basic metrics in Managed Service for Prometheus. You are not charged for the basic metrics. Therefore, you can use the dashboard feature of ApsaraMQ for RabbitMQ free of charge. For more information, see Metrics and Pay-as-you-go.
Usage notes
Only serverless instances and subscription Enterprise Edition and Enterprise Platinum Edition instances support the dashboard feature.
Service-linked roles
When you use the dashboard feature of ApsaraMQ for RabbitMQ, the service-linked role AliyunServiceRoleForAmqpMonitoring is required.
If the service-linked role is not created, ApsaraMQ for RabbitMQ automatically creates the role for you. This way, you can use the dashboard feature of ApsaraMQ for RabbitMQ as expected.
If the service-linked role is created, ApsaraMQ for RabbitMQ does not re-create the role for you.
For more information about service-linked roles, see Service-linked roles.
Metric details
Overview
The following metrics are provided by the dashboard feature of ApsaraMQ for RabbitMQ:
Overview: displays metrics such as the number of messages, the number of connections, and the number of consumers by instance or vhost.
Connection: displays the number of connections by instance or vhost.
Exchange: displays the number of inbound messages and the number of outbound messages by exchange.
Queue: displays the number of messages, the number of API calls, and the number of consumers by queue.
Consumer: displays the consumption results of messages.
All metrics except for the rabbitmq_instance_api_tps_max metric are displayed in minutes. The rabbitmq_instance_api_tps_max metric is displayed in seconds.
Overview
Metric type | Metric name | Unit | Description | Label |
gauge | rabbitmq_instance_api_tps_max | count/s | The maximum transactions per second (TPS) in a minute when API operations are called. Rule for determining the value: The system collects one TPS value every second based on a 1-minute cycle. The maximum value among the 60 values is used. | {tenant_userid, instanceId} |
counter | rabbitmq_connections_opened_total | count | The number of open connections. | {tenant_userid,instanceId,vHost} |
counter | rabbitmq_connections_closed_total | count | The number of closed connections. | {tenant_userid,instanceId,vHost} |
counter | rabbitmq_channels_opened_total | count | The number of open channels. | {tenant_userid,instanceId,vHost} |
counter | rabbitmq_channels_closed_total | count | The number of closed channels. | {tenant_userid,instanceId,vHost} |
counter | rabbitmq_queues_declared_total | count | The number of created queues. | {tenant_userid,instanceId,vHost} |
counter | rabbitmq_queues_deleted_total | count | The number of deleted queues. | {tenant_userid,instanceId,vHost} |
counter | rabbitmq_exchange_declared_total | count | The number of created exchanges. | {tenant_userid,instanceId,vHost} |
counter | rabbitmq_exchange_deleted_total | count | The number of deleted exchanges. | {tenant_userid,instanceId,vHost} |
counter | rabbitmq_exchange_bind_total | count | The number of bindings added to the exchange. | {tenant_userid,instanceId,vHost} |
counter | rabbitmq_exchange_unbind_total | count | The number of bindings removed from the exchange. | {tenant_userid,instanceId,vHost} |
counter | rabbitmq_queue_bind_total | count | The number of bindings added to the queue. | {tenant_userid,instanceId,vHost} |
counter | rabbitmq_queue_unbind_total | count | The number of bindings removed from the queue. | {tenant_userid,instanceId,vHost} |
gauge | rabbitmq_connections | count | The total number of open connections. | {tenant_userid,instanceId,vHost} |
gauge | rabbitmq_channels | count | The total number of open channels. | {tenant_userid,instanceId,vHost} |
Connection
Metric type | Metric name | Unit | Description | Label |
gauge | rabbitmq_connection_channels | count | The number of channels created on the connection. | {tenant_userid,instanceId,vHost,remoteAddress} |
Exchange
Metric type | Metric name | Unit | Description | Label |
counter | rabbitmq_exchange_messages_published_in_total | count | The number of inbound messages to the exchange. | {tenant_userid,instanceId,vHost,exchangeName} |
counter | rabbitmq_exchange_messages_published_out_total | count | The number of outbound messages from the exchange. | {tenant_userid,instanceId,vHost,exchangeName} |
Queue
Metric type | Metric name | Unit | Description | Label |
counter | rabbitmq_queue_messages_published_total | count | The number of messages sent to the queue. | {tenant_userid,instanceId,vHost,queueName} |
gauge | rabbitmq_queue_messages_ready | count | The number of ready messages in the queue. | {tenant_userid,instanceId,vHost,queueName} |
gauge | rabbitmq_queue_messages_timing | count | The number of scheduled messages in the queue. | {tenant_userid,instanceId,vHost,queueName} |
gauge | rabbitmq_queue_messages_unacked | count | The number of unacknowledged messages in the queue. | {tenant_userid,instanceId,vHost,queueName} |
counter | rabbitmq_queue_deliver_total | count | The number of times that the BasicConsume method is called. | {tenant_userid,instanceId,vHost,queueName} |
counter | rabbitmq_queue_get_total | count | The number of times that the BasicGet method is called. | {tenant_userid,instanceId,vHost,queueName} |
counter | rabbitmq_queue_ack_total | count | The number of times that the BasicAck method is called. | {tenant_userid,instanceId,vHost,queueName} |
counter | rabbitmq_queue_uack_total | count | The number of times that the BasicNack method is called. | {tenant_userid,instanceId,vHost,queueName} |
counter | rabbitmq_queue_recover_total | count | The number of times that the BasicRecover method is called. | {tenant_userid,instanceId,vHost,queueName} |
counter | rabbitmq_queue_reject_total | count | The number of times that the BasicReject method is called. | {tenant_userid,instanceId,vHost,queueName} |
gauge | rabbitmq_queue_consumers | count | The total number of consumers that consume messages in the queue. | {tenant_userid,instanceId,vHost,queueName} |
Consumer
Metric type | Metric name | Unit | Description | Label |
gauge | rabbitmq_consumer_acked_process_time_avg | count | The average processing time of messages for which responses are returned. | {tenant_userid,instanceId,vHost,queueName,remoteAddress,ackType} |
gauge | rabbitmq_consumer_unacked_process_time_avg | count | The average processing time of messages for which no responses are returned. | {tenant_userid,instanceId,vHost,queueName,remoteAddress,ackType} |
gauge | rabbitmq_consumer_acked_messages | count | The number of messages for which responses are returned. | {tenant_userid,instanceId,vHost,queueName,remoteAddress,ackType} |
gauge | rabbitmq_consumer_unacked_messages | count | The number of messages for which no responses are returned. | {tenant_userid,instanceId,vHost,queueName,remoteAddress} |
Metric types
The standard that is used to define metrics in ApsaraMQ for RabbitMQ complies with the standard that is used to define metrics in open source Prometheus. The metric types that ApsaraMQ for RabbitMQ provides include counters and gauges.
counter: a cumulative metric whose value only increases. Example: the number of API calls.
gauge: a metric whose value can increase or decrease. The value of a gauge indicates the instantaneous value of a statistical object. Example: the TPS for API calls.
Labels
The following items describe the labels of metrics in ApsaraMQ for RabbitMQ:
tenant_userid: the ID of the Alibaba Cloud account.
instanceId: the ID of the ApsaraMQ for RabbitMQ instance.
vHost: the name of the vhost on the ApsaraMQ for RabbitMQ instance.
remoteAddress: the IP address of the ApsaraMQ for RabbitMQ client.
Exchange: the name of the exchange on the ApsaraMQ for RabbitMQ instance.
queueName: the name of the queue on the ApsaraMQ for RabbitMQ instance.
ackType: the message consumption result returned by the client.
View the dashboard
Prerequisites
An ApsaraMQ for RabbitMQ instance is created. For more information, see Manage instances.
A vhost, a queue, and an exchange are created and available on the ApsaraMQ for RabbitMQ instance. For more information, see Manage vhosts, Manage exchanges, and Manage queues.
ARMS is activated. For more information, see Activate ARMS.
Procedure
Log on to the ApsaraMQ for RabbitMQ console. In the left-side navigation pane, click Instances.
In the top navigation bar of the Instances page, select the region where the instance that you want to manage resides. Then, in the instance list, click the name of the instance that you want to manage.
In the left-side navigation pane, click Dashboard. On the Dashboard page, view the dashboard.
Specify a vhost, exchange, queue, and time range to view the dashboard based on your business requirements.
Specify a vhost, exchange, or queue: On the Dashboard page, click the VirtualHost, ExchangeName, or QueueName drop-down list and enter the name of the vhost, exchange, or queue that you want to view in the corresponding field. If you do not enter the name of a vhost, exchange, or queue, the metrics of all vhosts, exchanges, and queues on the instance are displayed.
Specify a time range: In the upper-right corner of the Dashboard page, click the time picker. In the drop-down list that appears, select a predefined relative time range, such as Last 5 minutes, Last 12 hours, or Last 30 days. You can also specify a custom absolute time range by setting the start time and end time.
After the settings are configured, you can view the metrics for the specified vhost, exchange, queue, or time range on the Dashboard page. For information about the description of metrics, see Metric details.
How do I view the details of metrics provided by the dashboard feature of ApsaraMQ for RabbitMQ?
All metric data displayed on the dashboard of ApsaraMQ for RabbitMQ is stored in Managed Service for Prometheus in your Alibaba Cloud account. To view the data, perform the following steps:
Log on to the ARMS console. In the left-side navigation pane, click Integration Center.
On the Integration Center page, enter
RabbitMQ
in the search field and click the icon.In the search result, select the cloud service whose monitoring data you want to integrate into ARMS. Example: Alibaba Cloud RabbitMQ. For more information, see Step 1: Integrate the monitoring data of the cloud service into Managed Service for Prometheus.
After you integrate the monitoring data of the cloud service into ARMS, click Integration Management in the left-side navigation pane.
On the Cloud Service Region tab, click the name of the environment that you want to manage.
In the Basic Information section of the Component Management tab, click the cloud service region next to Default Metric Storage.
On the Settings tab of the page that appears, view the methods used to access different types of data.
How do I import metric data provided by the dashboard of ApsaraMQ for RabbitMQ to a self-managed Grafana system?
All metric data on the dashboard of ApsaraMQ for RabbitMQ are stored in Alibaba Cloud Managed Service for Prometheus. You can follow the procedure in the "How do I obtain metrics on the dashboard?" section to integrate the monitoring data of ApsaraMQ for RabbitMQ into Managed Service for Prometheus, obtain the environment name and HTTP API URL, and then use the HTTP API URL to integrate the metric data on the dashboard of ApsaraMQ for RabbitMQ into a self-managed Grafana system. For more information, see Use an HTTP API URL to connect a Prometheus instance to a self-managed Grafana system.