ApsaraMQ for MQTT integrates with CloudMonitor to collect metrics, visualize instance health, and send real-time alerts when thresholds are exceeded. Monitoring is available at no additional cost.
Metrics
ApsaraMQ for MQTT reports two categories of metrics: instance-level and topic-level.
CloudMonitor applies a calculation coefficient to certain throughput metrics based on the transmission quality level of the instance. This affects how the values of MaxQpsPerInstance and AverageQpsPerInstance are calculated. For details, see Calculation coefficients.
Instance metrics
| Metric | Metric name | Unit | Coefficient applied | Description |
|---|---|---|---|---|
| Maximum QPS per minute on the V3 instance | MaxQpsPerInstance | count/s | Yes | Peak queries per second within a one-minute window. Use this metric to determine whether the instance is being throttled. |
| Average QPS per minute on the instance | AverageQpsPerInstance | count/s | Yes | Mean queries per second within a one-minute window. |
| Outbound Internet traffic per minute on the instance | OutboundInternetTrafficPerInstance | bytes/min | No | Volume of data sent from the instance to the public Internet each minute. |
| Connections on the instance | ConnectionsPerInstance | count | No | Current number of active client connections. |
| Subscriptions on the instance | SubscriptionsPerInstance | count | No | Current number of active topic subscriptions. |
Topic metrics
| Metric | Metric name | Unit | Coefficient applied | Description |
|---|---|---|---|---|
| Average consumed messages per second on the topic | SendTpsPerTopic | count | No | Rate at which subscribers consume messages from the topic. |
| Average produced messages on the topic | ReceiveTpsPerTopic | count | No | Rate at which publishers produce messages to the topic. |
| Subscriptions on the topic | SubscriptionsPerTopic | count | No | Current number of subscriptions to the topic. |
Recommended baseline metrics
If you are setting up monitoring for the first time, start with these three metrics:
| Metric | Why it matters |
|---|---|
| MaxQpsPerInstance | Tracks whether the instance is approaching or hitting its QPS limit. A sustained high value indicates throttling may occur. |
| ConnectionsPerInstance | Sudden drops or spikes in connection count often signal client-side issues or network problems. |
| SubscriptionsPerInstance | Monitors subscription growth. An unexpected increase may indicate a subscription leak in client code. |
View monitoring charts
Before you begin, make sure that you have an ApsaraMQ for MQTT instance and access to the ApsaraMQ for MQTT console.
Log on to the ApsaraMQ for MQTT console. In the left-side navigation pane, click Instances.
In the top navigation bar, select the region of the target instance. On the Instances page, click the instance name to open the Instance Details page.
In the left-side navigation pane, click Monitoring and Alerting, then click the Monitoring Chart tab.
Select a resource type and a time range. Metric charts for the selected resource are displayed automatically.
Create an alert rule
Define thresholds on any metric to receive notifications when values exceed normal ranges. Alert rules are managed through CloudMonitor.
On the Monitoring and Alerting page, click the Alert Rule tab, then click Create Alert Rule. The console redirects to the Create Alarm Rule panel in CloudMonitor.
In the Create Alarm Rule panel, configure the alert conditions and notification settings, then click OK. For parameter descriptions and configuration steps, see Create an alert rule in the CloudMonitor documentation.
Recommended alert rules
When creating alert rules, prioritize the following metrics:
| Metric | Recommended threshold strategy |
|---|---|
| MaxQpsPerInstance | Set a warning threshold below the instance QPS limit to detect early signs of throttling before clients are affected. |
| ConnectionsPerInstance | Alert on sudden drops in connection count, which typically signal a service disruption or network issue. |
| OutboundInternetTrafficPerInstance | Monitor traffic volume approaching the bandwidth quota to prevent unexpected throttling. |
Billing
CloudMonitor monitoring for ApsaraMQ for MQTT is free. No additional charges apply.