This topic describes how to use CloudMonitor to monitor virtual private cloud (VPC) NAT gateways. You can use CloudMonitor to monitor VPC NAT gateways and collect monitoring data of VPC NAT gateways in real time. In the NAT Gateway console, you can troubleshoot issues that occur on your VPC NAT gateways based on the monitoring metrics and the time sequence curves that are generated by CloudMonitor.

Query 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 deployed.
  4. On the VPC NAT Gateway page, find the VPC NAT gateway that you want to manage, and click in the Monitoring column to view monitoring data.
    Category Metric Description
    Session Monitor SessionActiveConnection The maximum number of concurrent TCP and UDP connections that are supported by the VPC NAT gateway.
    SessionLimitDropConnection The rate of concurrent connections that are dropped due to the limit of concurrent connections to the VPC NAT gateway.
    SessionNewConnection/SessionNewLimitDropConnection 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 ratio of established connections to the upper limit of connections.

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

    Out Internet Monitor 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 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 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 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.
    Out Vpc Monitor BWRateToOutside The amount of outbound traffic per second, including the following two metrics:
    • Traffic Rate from VPC to Outside: the amount of traffic per second from the VPC NAT gateway to outside the VPC.
    • Traffic Rate from VPC: the amount of traffic per second from the VPC to the VPC NAT gateway.
    BytesToOutside 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 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.
    • Packet Rate from VPC: the number of packets per second from the VPC to the VPC NAT gateway.
    Packets 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. When the value of a monitoring metric reaches the specified threshold, an alert is triggered and you are immediately notified. This ensures that you can troubleshoot issues at the earliest opportunity.

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Alerts > Alert Rules.
  3. On the Threshold Value Alert tab, click Create Alert Rule.
  4. On the Create Alert Rule page, set the parameters for an alert rule.
    Parameter Description
    Product The name of the service that can be monitored by CloudMonitor. Example: enhanced_nat_gateway.
    Resource Range The resources to which the alert rule applies. Valid values:
    • All Resources: The alert rule applies to all the instances of the specified service. 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 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 applies to up to 1,000 instances. If the specified service has more than 1,000 instances, you may not receive alerts 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 applies 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 when the CPU utilization of the ECS instance exceeds 80%.
    Alert Rule Specify the name of the alert rule.
    Rule Description The content of the alert rule. This parameter defines the conditions that trigger an alert. 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 The period when the alert rule takes effect. The system monitors the metrics and generates alerts only if the alert rule is effective.
    Notification Contact The contact group to which alert notifications are sent.
    Notification Methods

    Email + DingTalk (Info) is selected by default.

    Auto Scaling If you select Auto Scaling, the specified scaling rule is triggered when an alert is generated. You must set the Region, ESS Group, and ESS Rule parameters.
    Log Service If you select Log Service, the alert message is written to Log Service when an alert is generated. You must set the Region, Project, and Logstore parameters.

    For more information about how to create a project and a Logstore, see Quick Start.

    Email Remark The custom remarks that you want to include in the alert notification email.
    HTTP WebHook The URL that can be accessed over the Internet. CloudMonitor sends a POST request to push an alert message to the specified URL. Only HTTP requests are supported.
  5. Click Confirm.

References