You can use CloudMonitor to track metrics, such as traffic bandwidth and packet loss, for inter-region VPC peering connections. By setting up threshold alerts, you can monitor instance performance in real time and ensure business stability.
Overview
VPC peering connection monitoring
VPC peering connections connect two VPCs and enable communication between IPv4 and IPv6 traffic. After a peering connection is created, two VPCs in the same region or across regions can communicate with each other through private networks.
For inter-region VPC peering connections, you can Monitor traffic bandwidth and packet loss by clicking the icon.
Monitoring metrics for intra-region VPC peering connections is currently not available.
CloudMonitor
You can use CloudMonitor to collect data, such as traffic bandwidth and packet loss, for VPC peering connections. CloudMonitor integrates application group management models and alert templates. You can create alert rules based on monitoring metrics and gain insights into the usage and status of your VPC peering connections.
Scenario
A company has created a peering connection to enable inter-region connectivity between VPC1 and VPC2. The traffic of the peering connection instance spiked to 100 MB within a short period, which potentially indicates a high traffic load on the deployed application or service. This could be due to normal business activity, a DDoS attack, crawler activity, or other network anomalies.
To monitor instances in real time and promptly identify and resolve network congestion or failures, the company uses CloudMonitor to collect traffic bandwidth metrics for the inter-region peering connection and creates threshold alert rules, thus helping reduce the O&M monitoring costs.
Procedure
Step 1: Create threshold alert rules
You can create threshold alert rules to monitor traffic bandwidth metrics of the peering connection in real time, ensuring business stability.
Log on to the CloudMonitor console.
In the left-side navigation pane, select .
On the Alert Rules page, click Create Alert Rule.
In the Create Alert Rule panel, configure the parameters based on the following figure. You can keep other parameters at default values or adjust them as needed.
The alert rule for this example is set as follows: An alert is triggered if the sum of inbound bandwidth for a consecutive period is ≥ 100 Mbit/s. A notification is sent if the sum for one consecutive period is ≥ 50 Mbit/s.
When any of the threshold rules are triggered, CloudMonitor sends a corresponding alert based on the configurations.
Step 2: Verify results
When the Inbound Bandwidth of the VPC peering connection exceeds 100 Mbit/s for one consecutive period:
The Alert Contact Group will receive a text message of the alert. You can view the alert history by clicking Alert History in the Actions column of Alert Rules.
References
For more information on monitoring metrics of CloudMonitor, see Metrics.
For more information on alert rule parameters and descriptions, see Alert rules.
You can manage alert rules through APIs, SDKs, Terraform, or ROS:
PutResourceMetricRule: Create a threshold alert rule for a specific metric of a resource.
CreateMetricRuleResources: Associate a resource with an alert rule.