All Products
Search
Document Center

NAT Gateway:Monitor and maintain VPC NAT gateways

Last Updated:Feb 20, 2024

You can use CloudMonitor to monitor a Virtual Private Cloud (VPC) NAT gateway in real time and obtain information about inbound traffic and outbound traffic. CloudMonitor can collect metric information about a VPC NAT gateway and generate a time series chart to help you troubleshoot.

View monitoring data

  1. Log on to the NAT Gateway console.
  2. In the left-side navigation pane, choose NAT Gateway > VPC NAT Gateway.
  3. In the top navigation bar, select the region where the VPC NAT gateway is created.
  4. On the VPC NAT Gateway page, find the VPC NAT gateway and click in the Monitoring column to view the monitoring data.

    Category

    Metric

    Description

    Session Monitor

    SessionActiveConnection/ErrorPortAllocationCount(count)

    The maximum number of concurrent TCP and UDP connections that are supported by the VPC NAT gateway.

    SessionLimitDropConnection(countS)

    The rate of concurrent connections that are dropped due to the limit of concurrent connections to the VPC NAT gateway.

    SessionNewConnection/SessionNewLimitDropConnection(countS)

    SessionNewConnection: the number of TCP and UDP connections that are established to the VPC NAT gateway per second.

    SessionNewLimitDropConnection: the number of new connections that are dropped per second due to the limit of new connections that can be established to the VPC NAT gateway per second.

    SessionNewConnectionWater/SessionNewLimitDropConnectionWater(%)

    SessionNewConnectionWater: the percentage of established connections to the upper limit of connections.

    SessionNewLimitDropConnectionWater: the percentage of established new connections to the upper limit of new connections.

    Incoming Flow Statistics

    BWRateToInside

    The amount of inbound traffic per second, including the following two metrics:

    • Rate of Traffic from outside VPC: the amount of traffic per second from outside the VPC to the VPC NAT gateway.

    • Rate of Traffic to VPC: the amount of traffic per second from the VPC NAT gateway to the VPC.

    BytesToInside(bytes)

    The total amount of inbound traffic, including the following two metrics:

    • Traffic from outside VPC: the amount of traffic from outside the VPC to the VPC NAT gateway.

    • Traffic to VPC: the amount of traffic from the VPC NAT gateway to the VPC.

    PacketsPerSecond(countS)

    The number of inbound packets per second, including the following two metrics:

    • Rate of Packets from outside VPC: the number of packets per second from outside the VPC to the VPC NAT gateway.

    • Rate of Packets to VPC: the number of packets per second from the VPC NAT gateway to the VPC.

    Packets(count)

    The total number of inbound packets, including the following two metrics:

    • Number of Packets from outside VPC: the number of packets from outside the VPC to the VPC NAT gateway.

    • Number of Packets to VPC: the number of packets from the VPC NAT gateway to the VPC.

    Outlet Flow Statistics

    BWRateToOutside

    The amount of outbound traffic per second, including the following two metrics:

    • Rate of Traffic from VPC to Outside: the amount of traffic per second from the VPC NAT gateway to outside the VPC.

    • Rate of Traffic from VPC: the amount of traffic per second from the VPC to the VPC NAT gateway.

    BytesToOutside(bytes)

    The total amount of outbound traffic, including the following two metrics:

    • Traffic from VPC to Outside: the amount of traffic from the VPC NAT gateway to outside the VPC.

    • Traffic from VPC: the amount of traffic from the VPC to the VPC NAT gateway.

    PacketsPerSecond(countS)

    The number of outbound packets per second, including the following two metrics:

    • Rate of Packets from VPC to Outside: the number of packets per second from the VPC NAT gateway to outside the VPC.

    • Rate of Packets from VPC: the number of packets per second from the VPC to the VPC NAT gateway.

    Packets(count)

    The number of outbound packets, including the following two metrics:

    • Number of Packets from VPC to Outside: the number of packets from the VPC NAT gateway to outside the VPC.

    • Packets from VPC: the number of packets from the VPC to the VPC NAT gateway.

Create an alert rule

You can create alert rules for a VPC NAT gateway in the CloudMonitor console. After you create an alert rule, you can be notified in a timely manner when exceptions occur.

  1. Log on to the CloudMonitor console.

  2. In the left-side navigation pane, choose Alerts > Alert Rules.

  3. On the Alert Rules page, click Create Alert Rule.

  4. In the Create Alert Rule panel, set the following parameters and click Confirm:

    This topic describes only the key parameters. For more information about the other parameters, see Create an alert rule.

    Parameter

    Description

    Product

    The name of the service that you want to monitor by using CloudMonitor. Example: enhanced_nat_gateway.

    Resource Range

    The resources to which the alert rule is applied. Valid values:

    • All Resources: The alert rule is applied to all your instances of the specified type. For example, if you set the Resource Range parameter to All Resources and the alert threshold for CPU utilization to 80% for ApsaraDB for MongoDB, CloudMonitor sends an alert notification when the CPU utilization of an ApsaraDB for MongoDB instance exceeds 80%. If you set the Resource Range parameter to All Resources, the alert rule is applied to up to 1,000 instances. If the specified service has more than 1,000 instances, you may not receive an alert notification when the value of the specified metric reaches the threshold. We recommend that you add resources to application groups before you create alert rules.

    • Instances: The alert rule is applied to a specific instance. For example, if you set the Resource Range parameter to Instances and the alert threshold of CPU utilization to 80% for an ECS instance, CloudMonitor sends an alert notification when the CPU utilization of the ECS instance exceeds 80%.

    Rule Name

    The name of the alert rule.

    Rule Description

    The content of the alert rule. This parameter specifies the conditions that are used to trigger the alert rule. For example, if the condition specifies that the average CPU utilization in 5 minutes is greater than or equal to 90% for three consecutive cycles, CloudMonitor checks whether the condition is met for only three times every 5 minutes.

    Mute For

    The period during which an alert is muted. This parameter specifies the interval at which an alert notification is sent to the specified contacts if the alert is not cleared.

    Effective Period

    Set the period during which the alert rule is effective. The system monitors the metrics and generates alerts only during the effective period.

    Alert Contact Group

    The contact group to which alert notifications are sent.

    Advanced Settings

    HTTP Callback

    The webhook URL that can be accessed over the Internet. CloudMonitor sends a POST request to push an alert notification to the webhook URL that you specify. Only HTTP requests are supported.

    Method for handling alerts when no monitoring data is found

    Specify the method that is used to handle alerts if no monitoring data exists. Valid values:

    • Do not do anything (default)

    • Send alert notifications

    • Treated as normal

    Tag

    Specify tags for the alert rule. A tag consists of a name and a value.

References