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. No additional fees apply.
For more information about CloudMonitor, see Cloud service monitoring.
Prerequisites
Before you begin, make sure 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, throttling, and resource usage for a single RocketMQ instance. Use these metrics to monitor capacity utilization and detect instance-wide issues.
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 |
Peak TPS for message sending on the ApsaraMQ for RocketMQ 5.0 instance | InstanceSendApiCallTps | count/s | userId, instanceId |
Peak TPS for message consumption on the ApsaraMQ for RocketMQ 5.0 instance | InstanceReceiveApiCallTps | count/s | userId, instanceId |
Storage size of the ApsaraMQ for RocketMQ 5.0 instance | InstanceStorageSize | B | userId, instanceId |
Internet outbound bandwidth of the ApsaraMQ for RocketMQ 5.0 instance | InstanceInternetFlowoutBandwidth | B/s | 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 the type of resource whose metrics you want to query from the Group Name drop-down list. Then, select a query time.
The charts of all metrics for the resource type are automatically displayed on this page.
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 page is redirected to the Create Alert Rule panel in the CloudMonitor console.
In the Create Alert Rule panel, follow the on-screen instructions to configure the rule and notification settings. Then, click OK. For information about the parameters, 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.