When message throughput spikes, consumers fall behind, or requests get throttled, you need visibility into what is happening across your RocketMQ instances. ApsaraMQ for RocketMQ integrates with CloudMonitor to collect metrics at 1-minute intervals, display them as time-series charts, and send alert notifications when thresholds are breached.
Monitoring and alerting is free of charge.
For more information about CloudMonitor, see Cloud service monitoring.
Prerequisites
Before you begin, verify that the following service-linked role exists in your account:
-
Role name: AliyunServiceRoleForOns
-
Role policy: AliyunServiceRolePolicyForOns
This role grants ApsaraMQ for RocketMQ access to CloudMonitor and Application Real-Time Monitoring Service (ARMS) for monitoring, alerting, and dashboard features.
For more information, see Service-linked roles.
Monitoring metrics
The following tables list available metrics by category. All metrics are aggregated at 1-minute intervals.
For definitions of Ready messages and Ready message queue time, see Terms.
Instance metrics
Instance-level metrics track overall throughput and throttling for a single RocketMQ instance. Use these metrics to monitor API call rates, message volumes, and throttling events.
|
Metric |
Metric name |
Unit |
Dimensions |
|
Transactions per second (TPS) on the instance |
InstanceApiCallTps |
count/s |
userId, instanceId |
|
Messages sent by producers per minute |
SendMessageCountPerInstance |
count/m |
userId, instanceId |
|
Messages received by consumers per minute |
ReceiveMessageCountPerInstance |
count/m |
userId, instanceId |
|
Throttled requests to send messages per minute |
ThrottledSendRequestsPerInstance |
count/m |
userId, instanceId |
|
Throttled requests to receive messages per minute |
ThrottledReceiveRequestsPerInstance |
count/m |
userId, instanceId |
Group metrics
Group-level metrics measure consumer performance for a specific consumer group. Use these metrics to detect consumer lag, identify slow consumers, and track dead-letter message generation.
|
Metric |
Metric name |
Unit |
Dimensions |
|
Accumulated messages |
ConsumerLag |
count |
userId, instanceId, groupId |
|
Message processing latency |
ConsumerLagLatencyPerGid |
ms |
userId, instanceId, groupId |
|
Ready messages |
ReadyMessages |
count |
userId, instanceId, groupId |
|
Ready message queue time |
ReadyMessageQueueTime |
ms |
userId, instanceId, groupId |
|
Messages received by consumers per minute |
ReceiveMessageCountPerGid |
count/m |
userId, instanceId, groupId |
|
Throttled requests to receive messages per minute |
ThrottledReceiveRequestsPerGid |
count/m |
userId, instanceId, groupId |
|
Dead-letter messages generated per minute |
SendDLQMessageCountPerGid |
count/m |
userId, instanceId, groupId |
Topic metrics
Topic-level metrics track producer throughput and throttling for a specific topic.
|
Metric |
Metric name |
Unit |
Dimensions |
|
Messages sent by producers per minute |
SendMessageCountPerTopic |
count/m |
userId, instanceId, topic |
|
Throttled requests to send messages per minute |
ThrottledSendRequestsPerTopic |
count/m |
userId, instanceId, topic |
Group and topic metrics
These metrics combine a specific consumer group with a specific topic for the most granular view. Use them to pinpoint consumption issues at the topic level within a group.
|
Metric |
Metric name |
Unit |
Dimensions |
|
Accumulated messages |
ConsumerLagPerGidTopic |
count |
userId, instanceId, groupId, topic |
|
Message processing latency |
ConsumerLagLatencyPerGidTopic |
ms |
userId, instanceId, topic, groupId |
|
Ready messages |
ReadyMessagesPerGidTopic |
count |
userId, instanceId, groupId, topic |
|
Ready message queue time |
ReadyMessageQueueTimePerGidTopic |
ms |
userId, instanceId, groupId, topic |
|
Messages received by consumers per minute |
ReceiveMessageCountPerGidTopic |
count/m |
userId, instanceId, topic, groupId |
|
Throttled requests to receive messages per minute |
ThrottledReceiveRequestsPerGidTopic |
count/m |
userId, instanceId, topic, groupId |
|
Dead-letter messages generated per minute |
SendDLQMessageCountPerGidTopic |
count/m |
userId, instanceId, groupId, topic |
View metrics
Log on to the ApsaraMQ for RocketMQ console. In the left-side navigation pane, click Instances.
In the top navigation bar, select a region, such as China (Hangzhou). On the Instances page, click the name of the instance that you want to manage.
In the left-side navigation pane, click Monitoring and Alerts.
On the Monitoring and Alerts page, select a resource type from the Group Name drop-down list, then select a query time range. The page automatically displays metric charts for the selected resource type.
Create an alert rule
On the Instances page, click the name of the instance that you want to manage.
In the left-side navigation pane, click Monitoring and Alerts.
In the upper-right corner of the Monitoring and Alerts page, click Create Alert Rule. The Create Alert Rule panel opens in the CloudMonitor console.
Configure the alert rule and notification settings, then click OK. For parameter descriptions, see Create an alert rule.
See also
-
Configure the monitoring and alerting feature for risk warning: Learn how to set up alert rules for key metrics and business metrics.