Skip to main content
idle · azure

NAT gateways processing under 1 KB of traffic in a month

resource types
1
rule IDs covered
1
severity
medium

What does ZopNight detect here?

Azure bills a NAT gateway a flat ~$0.045/hr, about $32 a month, before any byte crosses it. ZopNight reads the ByteCount metric over 30 days and recommends deletion only when both average and maximum stay under 1,024 bytes, a bar that admits probe noise and nothing else.

Signal and threshold

How ZopNight evaluates NAT gateways processing under 1 KB of traffic in a month.
Field Value
Rule IDsRC-1383
Categoryidle
Severitymedium
Metricnone — pure configuration read
Sourcenat_gateway_idle.go

The provisioning fee is the whole story

Azure NAT Gateway pricing has two parts: a flat ~$0.045 hourly provisioning fee and a per-GB charge on processed data. An idle gateway generates no data charge by definition, so what this rule recovers is the fixed fee, roughly $32 a month for a resource routing nothing. Because the fee is flat, the entire monthly cost becomes the savings figure when the gateway proves idle.

Under a kilobyte, in raw bytes

The gating metric is ByteCount on the NAT gateway, reported as a total per sampling window: raw bytes, not bytes per second. Both the series average and the maximum must stay below 1,024 bytes across the window. A month of monitoring-probe noise fits under 1 KB; a single genuine outbound flow does not. Any datapoint at or above the bar counts as real use and the rule abstains.

Guard rails before an irreversible delete

Three additional gates protect against false positives. The gateway must be in a succeeded provisioning state. A resource mid-deploy or mid-delete never receives a destructive recommendation. The ByteCount series must span the full 30 days, so a two-week-old gateway that simply has not been exercised yet abstains rather than being deleted before its first workload arrives. And an absent metric (collector outage, permission gap) is treated as unknown traffic state, never as zero.

Measure it yourself

Terminal window
az monitor metrics list \
--resource "/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Network/natGateways/<name>" \
--metric ByteCount \
--interval PT1H --offset 30d --aggregation Average Maximum

Unhooking a NAT gateway cleanly

A NAT gateway with subnet associations still serves as those subnets’ outbound path even when current traffic is nil. Confirm under Subnets that nothing routes through it, remove the associations, then delete. The attached public IP survives independently and keeps billing, so release it too. If a VNet needs outbound access only to specific Azure services, Private Link or service endpoints replace the gateway at lower cost.

Detection footprint

Reader covers gateway discovery and its subnet associations; Monitoring Reader covers ByteCount. ZopNight holds no write path to NAT gateways; the delete is always yours.

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

417 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

417 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·