All Products
Search
Document Center

ApsaraMQ for RabbitMQ:Monitoring and alerting

Last Updated:Nov 25, 2024

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

Prerequisites

The AliyunCloudMonitorReadOnlyAccess policy is attached to the Resource Access Management (RAM) user that you use. To attach the policy, log on to the RAM console. For more information, see Step 2: Grant permissions to the RAM user.

The following code describes the policy that is used to query metrics in CloudMonitor:

{
    "Version": "1",
    "Statement": [
        {
            "Action": "cms:QueryMetric*",
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Billing

You are not charged for using CloudMonitor in ApsaraMQ for RabbitMQ.

Metrics

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

Resource type

Metric

Unit

Namespace

MetricName

Dimensions

Statistics

Average Inbound Message Rate of an Instance per Minute

Note

Average number of inbound messages of an instance = Total number of inbound messages of the instance/60

Count/s

acs_amqp

InstanceTPSIn

userId, regionId, and instanceId

Value

Average Outbound Message Rate of an Instance per Minute

Note

Average number of outbound messages of an instance = Total number of outbound messages of the instance/60

Count/s

acs_amqp

InstanceTPSOut

userId, regionId, and instanceId

Value

Peak API Request Rate of an Instance (Maximum Value per Minute)

Note

Rule for determining the value: The system collects one sample every second based on a 1-minute cycle. The maximum value among the 60 samples is used.

Count/s

acs_amqp

InstanceMaxTpsInMiunte

userId, regionId, and instanceId

Value

InstanceConsumers

Count

acs_amqp

InstanceConsumers

userId, regionId, and instanceId

Value

InstanceConnections

Count

acs_amqp

InstanceConnections

userId, regionId, and instanceId

Value

InstanceChannels

Count

acs_amqp

InstanceChannelsNew

userId, regionId, and instanceId

Value

vhost

VHostTPSIn

Count/s

acs_amqp

VHostTPSIn

userId, regionId, instanceId, and vhostName

Value

VHostTPSOut

Count/s

acs_amqp

VHostTPSOut

userId, regionId, instanceId, and vhostName

Value

InstanceVhostConsumers

Count

acs_amqp

InstanceVhostConsumers

userId, regionId, instanceId, and vhostName

Value

VHostConnections

Count

acs_amqp

VhostConnections

userId, regionId, instanceId, and vhostName

Value

VHostChannels

Count

acs_amqp

VhostChannels

userId, regionId, instanceId, and vhostName

Value

Queue

QueueTPSIn

Count/s

acs_amqp

QueueTPSIn

userId, regionId, instanceId, vhostName, and queueName

Value

QueueTPSOut

Count/s

acs_amqp

QueueTPSOut

userId, regionId, instanceId, vhostName, and queueName

Value

InstanceVhostQueueConsumers

Count

acs_amqp

InstanceVhostQueueConsumers

userId, regionId, instanceId, vhostName, and queueName

Value

InstanceQueueMessageAccumulation

Note

The following items describe the methods that are used to calculate the number of accumulated messages in a queue:

  • If you do not specify the time-to-live (TTL) for messages in the queue, the number of accumulated messages in the queue is equal to the number of unconsumed messages in the queue.

  • If you specify the TTL for messages in the queue, messages are sent to a timer that is similar to a timing wheel. The number of accumulated messages is the number of messages in the timer. In this case, the number of accumulated messages decreases as messages are consumed. If the TTL that you specify for messages in the queue does not take effect, no message enters the timer, and the number of accumulated messages is displayed as 0. The TTL for messages does not take effect in scenarios such as the TTL exceeds the maximum delay time for delayed messages or the TTL is configured on a dead-letter queue. For information about the maximum delay time for delayed messages, see Limits.

  • The methods that are used to calculate the number of accumulated messages displayed on the Queues page and the dashboard in the ApsaraMQ for RabbitMQ console are the same as the preceding methods.

Count

acs_amqp

InstanceVhostQueueMessageAccum

userId, regionId, instanceId, vhostName, and queueName

Maximum

Exchange

ExchangeTPSIn

Count/s

acs_amqp

ExchangeTPSIn

userId, regionId, instanceId, vhostName, and exchangeName

Value

ExchangeTPSOut

Count/s

acs_amqp

ExchangeTPSOut

userId, regionId, instanceId, vhostName, and exchangeName

Value

You can call the DescribeMetricMetaList operation to obtain information about the preceding metrics of ApsaraMQ for RabbitMQ.

View monitoring data

  1. Log on to the ApsaraMQ for RabbitMQ console. In the left-side navigation pane, click Instances.

  2. 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.

  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 the 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 provides an example of the Monitoring and Alerting page.image

Create an alert rule

  1. Log on to the ApsaraMQ for RabbitMQ console. In the left-side navigation pane, click Instances.

  2. 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.

  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 更多 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.

References

For information about how to query metric details by calling API operations, see DescribeMetricMetaList.