NAT Gateway Metrics

You can monitor the health, capacity, and performance of your NAT gateways by using metrics, alarms, and notifications. For more information, see Monitoring and Notifications.

This topic describes the metrics emitted by the metric namespace oci_nat_gateway.

Resources: NAT gateways

Overview of Metrics: oci_nat_gateway

A NAT gateway is used to give an entire private network access to the internet without assigning each host a public IPv4 address. The hosts can initiate connections to the internet and receive responses, but not receive inbound connections initiated from the internet.

The available metrics help you determine quickly if your NAT gateway is up, how much data is flowing through the gateway, and if packets are being dropped for unexpected errors.

  • Traffic to and from the NAT gateway: Per-gateway traffic levels (packets and bytes), which can help you identify meaningful increases or decreases in traffic coming in and out of the gateway.
  • Packets dropped: Per-gateway drops (dropped packets), which can help you identify changes in traffic caused by issues such as NAT port exhaustion.

Required IAM Policy

To monitor resources, you must be given the required type of access in a policy  written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. The policy must give you access to the monitoring services as well as the resources being monitored. If you try to perform an action and get a message that you don’t have permission or are unauthorized, confirm with your administrator the type of access you've been granted and which compartment  you should work in. For more information on user authorizations for monitoring, see the Authentication and Authorization section for the related service: Monitoring or Notifications.

Available Metrics: oci_nat_gateway

The metrics listed in the following table are automatically available for each NAT gateway that you create. You do not need to enable monitoring to get these metrics.

You also can use the Monitoring service to create custom queries.

Each metric includes one or more of the following dimensions: 

RESOURCEID
The OCID  of the NAT gateway.
DROPTYPE
The type of packet drop:
  • noPorts: Packets dropped due to NAT port exhaustion.
Metric Metric Display Name Unit Description Dimensions
BytesToNATgw Bytes from OCI resources to NAT gateway

Bytes

Number of bytes sent from Oracle Cloud Infrastructure (OCI) resources to NAT gateway.

resourceId
BytesFromNATgw Bytes from NAT gateway to OCI resources

Bytes

Number of bytes sent from NAT gateway to OCI resources.

PacketsToNATgw Packets from OCI resources to NAT gateway

Packets

Number of packets sent from OCI resources to NAT gateway.

PacketsFromNATgw Packets from NAT gateway to OCI resources

Packets

Number of packets sent from NAT gateway to OCI resources.
DropsToNATgw Packet Drops from OCI resource to NAT gateway

Packets

Number of packets from OCI resources to NAT Gateway that were dropped by NAT Gateway.

resourceId

dropType

Using the Console

To view default metric charts for all NAT gateways in a compartment