After you create a Message Queue for RabbitMQ instance, Cloud Monitor automatically starts to monitor the instance. You can view monitoring metrics of resources, such as the number of incoming messages, number of outgoing messages, and the number of consumers, to learn the usage of the Message Queue for RabbitMQ instance. The resources include instances, vhosts, queues, and exchanges. Cloud Monitor also allows you to configure alert rules for these monitoring metrics so that you can receive alerts if exceptions occur. This topic describes monitoring metrics and how to view monitoring data and configure alert rules in the new version of the Monitoring and Alerting page.

Monitoring metrics

The following table describes the monitoring metrics that are supported by Message Queue for RabbitMQ in the new version of the Monitoring and Alerting page.

Resource type Monitoring metric Unit Namespace Metric name Dimension Statistics
Instance Number of incoming messages per second Count/s acs_amqp InstanceTPSIn userId, regionId, and instanceId Value
Number of outgoing messages per second Count/s acs_amqp InstanceTPSOut userId, regionId, and instanceId Value
Number of consumers Count acs_amqp InstanceConsumers userId, regionId, and instanceId Value
Number of connections Count acs_amqp InstanceConnections userId, regionId, and instanceId Value
Number of channels Count acs_amqp InstanceChannelsNew userId, regionId, and instanceId Value
vhost Number of incoming messages per second Count/s acs_amqp VHostTPSIn userId, regionId, instanceId, and vhostName Value
Number of outgoing messages per second Count/s acs_amqp VHostTPSOut userId, regionId, instanceId, and vhostName Value
Number of consumers Count acs_amqp InstanceVhostConsumers userId, regionId, instanceId, and vhostName Value
Number of connections Count acs_amqp VhostConnections userId, regionId, instanceId, and vhostName Value
Number of channels Count acs_amqp VhostChannels userId, regionId, instanceId, and vhostName Value
Queue Number of incoming messages per second Count/s acs_amqp QueueTPSIn userId, regionId, instanceId, vhostName, and queueName Value
Number of outgoing messages per second Count/s acs_amqp QueueTPSOut userId, regionId, instanceId, vhostName, and queueName Value
Number of consumers Count acs_amqp InstanceVhostQueueConsumers userId, regionId, instanceId, vhostName, and queueName Value
Number of accumulated messages Count acs_amqp InstanceVhostQueueMessageAccum userId, regionId, instanceId, vhostName, and queueName Maximum
Exchange Number of incoming messages per second Count/s acs_amqp ExchangeTPSIn userId, regionId, instanceId, vhostName, and exchangeName Value
Number of outgoing messages per second Count/s acs_amqp ExchangeTPSOut userId, regionId, instanceId, vhostName, and exchangeName Value

You can call the DescribeMetricMetaList API operation to obtain detailed information about the preceding monitoring metrics for Message Queue for RabbitMQ.

View monitoring data

  1. Log on to the Message Queue for RabbitMQ console.
  2. In the top navigation bar, select the region where your instance resides.
  3. In the left-side navigation pane, click Monitoring and Alerting.
  4. In the upper part of the Monitoring and Alerting page, select Message Queue for RabbitMQ (Instance Edition). Then, specify Instance, Group Name, and Resource type, and select a time range.
    The following figure shows how to view the monitoring data of an instance within seven days.pg_monitor
    The monitoring data of the instance within seven days is displayed on the Monitoring and Alerting page.result

Create an alert rule

  1. Log on to the Message Queue for RabbitMQ console.
  2. In the top navigation bar, select the region where your instance resides.
  3. In the left-side navigation pane, click Monitoring and Alerting.
  4. On the Monitoring and Alerting page, click Alert Rule.
  5. You are redirected to the Alert Rules page of Cloud Monitor. Click Create Alert Rule on the Threshold Value Alert tab.
  6. In the Related Resource section of the Create Alert Rule page, select MQ for AMQP Instance from the Product drop-down list and specify Resource Range. In the Set Alert Rules section, configure an alert rule. In the Notification Method section, configure a notification method. Then, click Confirm.
    The following figure shows how to configure an alert rule that an alert is triggered when the number of incoming messages per second is greater than 1000 for an instance.pg_alarm
    You can view the created alert rule on the Monitoring and Alerting page.alarm_result