You can use CloudMonitor to monitor the performance of your VPC NAT gateway in real time and track inbound and outbound traffic. CloudMonitor collects real-time metrics from the gateway and displays them as time-series charts in the VPC NAT gateway console to help you troubleshoot issues.
View VPC NAT gateway monitoring
- Log on to the NAT Gateway console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select the region where the VPC NAT gateway is created.
-
On the VPC NAT Gateway page, find the target VPC NAT gateway and click the
icon in the Monitor column to view its metrics.Metric category
Metric
Description
Session statistics
Concurrent connections / Connections lost due to port allocation failure (count)
The current number of concurrent TCP and UDP connections on the VPC NAT gateway.
Concurrent connection drop rate (connections/s)
The rate at which connections are dropped because the number of concurrent connections exceeds the limit.
New connection rate / New connection drop rate (connections/s)
New connection rate: The number of new TCP and UDP connections established per second.
New connection drop rate: The rate at which new connections are dropped because the new connection rate exceeds the maximum limit.
Concurrent connection watermark / New connection watermark (%)
Concurrent connection watermark: The ratio of current concurrent connections to the maximum limit, expressed as a percentage.
New connection watermark: The ratio of the current new connection rate to the maximum rate, expressed as a percentage.
NoteBy default, a single NAT gateway instance supports a rate of 100,000 new connections per second and a limit of 2 million concurrent connections. If your service usage triggers the elastic capabilities of the NAT gateway, these adjustments take about 10 minutes to become effective.
Inbound traffic statistics
Inbound traffic rate
The rate of inbound traffic in bytes per second. This includes:
-
Rate of traffic from external networks: The rate of traffic from the internet to the VPC NAT gateway.
-
Rate of traffic to the VPC: The rate of traffic from the VPC NAT gateway to resources within the VPC.
Inbound traffic (bytes)
The total volume of inbound traffic in bytes. This includes:
-
Traffic from external networks: The total traffic volume from the internet to the VPC NAT gateway.
-
Traffic to the VPC: The total traffic volume from the VPC NAT gateway to resources within the VPC.
Inbound packet rate(packets/s)
The rate of inbound data packets. This includes:
-
Packet rate from external networks: The number of packets per second from the internet to the VPC NAT gateway.
-
Packet rate to the VPC: The number of packets per second from the VPC NAT gateway to resources within the VPC.
Inbound packets (count)
The total number of inbound data packets. This includes:
-
Packets from external networks: The number of packets from the internet to the VPC NAT gateway.
-
Packets to the VPC: The number of packets from the VPC NAT gateway to resources within the VPC.
Outbound traffic statistics
Outbound traffic rate
The rate of outbound traffic in bytes per second. This includes:
-
Rate of traffic to external networks: The rate of traffic from the VPC NAT gateway to the internet.
-
Rate of traffic from the VPC: The rate of traffic from resources within the VPC to the VPC NAT gateway.
Outbound traffic (bytes)
The total volume of outbound traffic in bytes. This includes:
-
Traffic to external networks: The total traffic volume from the VPC NAT gateway to the internet.
-
Traffic from the VPC: The total traffic volume from resources within the VPC to the VPC NAT gateway.
Outbound packet rate (packets/s)
The rate of outbound data packets. This includes:
-
Packet rate to external networks: The number of packets per second from the VPC NAT gateway to the internet.
-
Packet rate from the VPC: The number of packets per second from resources within the VPC to the VPC NAT gateway.
Outbound packets (count)
The total number of outbound data packets. This includes:
-
Packets to external networks: The number of packets from the VPC NAT gateway to the internet.
-
Packets from the VPC: The number of packets from resources within the VPC to the VPC NAT gateway.
-
Create an alert rule
You can create an alert rule for your VPC NAT gateway in the CloudMonitor console. Setting thresholds for specific metrics ensures that you are immediately notified of anomalies, allowing you to resolve issues quickly.
-
Log on to the CloudMonitor console.
-
In the left-side navigation pane, choose , and then click Create Alert Rule.
-
On the Create Alert Rule panel, configure the parameters for the alert rule and click Confirm.
-
Product: Select enhanced_nat_gateway.
-
Resource Range: Specifies the scope of the rule. This setting cannot be changed after the rule is created. You can select All Resources to apply the rule to all instances of the selected Product. You can also select Instances and specify the Related Resource to apply the rule only to specific instances.
-
Mute Period: The time to wait before sending another notification for an unresolved alert.
-
Effective Period: The time period during which the alert rule is active.
-
Alert Contact Group: The group of contacts that receives notifications when an alert is triggered.
-
Related APIs
-
PutResourceMetricRule: Sets an alert rule for a metric of a single resource.
-
CreateMetricRuleResources: Associates resources with an existing alert rule.