After you create a ApsaraMQ for RabbitMQ instance, CloudMonitor automatically starts to monitor the instance. You can view the metrics of instances, vhosts, queues, and exchanges to analyze the instance usage and performance. CloudMonitor also allows you to create alert rules for these metrics. This way, you can receive alerts and troubleshoot exceptions at your earliest opportunity.

Prerequisites

If you want to use a RAM user to perform monitoring and alerting operations, go to the RAM console and grant the AliyunCloudMonitorReadOnlyAccess permission to the RAM user. For more information, see Step 2: Grant permissions to the RAM user.
The content of the CloudMonitor permission policy is:
{
    "Version": "1",
    "Statement": [
        {
            "Action": "cms:QueryMetric*",
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Metrics

The following table describes the metrics that are supported by the new version of ApsaraMQ for RabbitMQ.

Resource typeMetricUnitNamespaceMetricNameDimensionsStatistics
InstancePeak TPS of API calls
Note This metric specifies the peak TPS of API calls per minute. In total, 60 TPS samples are taken at a 1-second interval in a minute. The largest TPS is used as the peak TPS for the minute.
Transactions/secondacs_amqpInstanceMaxTpsInMiunteuserId, regionId, and instanceIdValue
Number of inbound messages per secondMessages/secondacs_amqpInstanceTPSInuserId, regionId, and instanceIdValue
Number of outbound messages per secondMessages/secondacs_amqpInstanceTPSOutuserId, regionId, and instanceIdValue
Number of consumersN/Aacs_amqpInstanceConsumersuserId, regionId, and instanceIdValue
Number of connectionsN/Aacs_amqpInstanceConnectionsuserId, regionId, and instanceIdValue
Number of channelsN/Aacs_amqpInstanceChannelsNewuserId, regionId, and instanceIdValue
VhostNumber of inbound messages per secondMessages/secondacs_amqpVHostTPSInuserId, regionId, instanceId, and vhostNameValue
Number of outbound messages per secondMessages/secondacs_amqpVHostTPSOutuserId, regionId, instanceId, and vhostNameValue
Number of consumersN/Aacs_amqpInstanceVhostConsumersuserId, regionId, instanceId, and vhostNameValue
Number of connectionsN/Aacs_amqpVhostConnectionsuserId, regionId, instanceId, and vhostNameValue
Number of channelsN/Aacs_amqpVhostChannelsuserId, regionId, instanceId, and vhostNameValue
QueueNumber of inbound messages per secondMessages/secondacs_amqpQueueTPSInuserId, regionId, instanceId, vhostName, and queueNameValue
Number of outbound messages per secondMessages/secondacs_amqpQueueTPSOutuserId, regionId, instanceId, vhostName, and queueNameValue
Number of consumersN/Aacs_amqpInstanceVhostQueueConsumersuserId, regionId, instanceId, vhostName, and queueNameValue
Number of accumulated messagesN/Aacs_amqpInstanceVhostQueueMessageAccumuserId, regionId, instanceId, vhostName, and queueNameMaximum
ExchangeNumber of inbound messages per secondMessages/secondacs_amqpExchangeTPSInuserId, regionId, instanceId, vhostName, and exchangeNameValue
Number of outbound messages per secondMessages/secondacs_amqpExchangeTPSOutuserId, regionId, instanceId, vhostName, and exchangeNameValue

You can call the DescribeMetricMetaList operation to query the detailed information about the preceding metrics for your ApsaraMQ for RabbitMQ instance.

View monitoring data

  1. Log on to the ApsaraMQ for RabbitMQ console. In the left-side navigation pane, select Instances.
  2. In the top navigation bar of the Instances page, select a region. In the instance list, click the name of the instance that you want to manage.
  3. In the left-side navigation pane, click Monitoring and Alerting.
  4. On the Monitoring and Alerting page, set the Group Name parameter to the type of resource whose monitoring data you want to view, set the Resource type parameter to a specific resource, and then specify a time range.
    The following figure shows an example on the Monitoring and Alerting page. Figure-Monitoring and alerting

Create an alert rule

  1. Log on to the ApsaraMQ for RabbitMQ console. In the left-side navigation pane, select Instances.
  2. In the top navigation bar of the Instances page, select a region. In the instance list, click the name of the instance that you want to manage.
  3. In the left-side navigation pane, click Monitoring and Alerting.
  4. In the upper-right corner of the Monitoring and Alerting page, move the pointer over the More icon and click Configure Alert Rules.
    The page is redirected to the Alert Rules page in the CloudMonitor console.
  5. On the Alert Rules page, click Create Alert Rule. In the Create Alert Rule panel, configure the parameters based on your business requirements. For more information, see Alert service.