Idle Azure VM
1
1
medium
What does ZopNight detect here?
Running Azure VMs averaging under 5% CPU over 30 days, with memory and network guards, get a recurring off-hours schedule sized by the measured idle fraction, never a one-shot deallocation. Reservation-covered VMs are instead right-sized via catalog rate deltas, and both paths abstain when pricing or schedule data is absent.
Signal and threshold
| Field | Value |
|---|---|
| Rule IDs | RC-201 |
| Category | idle |
| Severity | medium |
| Metric | none — pure configuration read |
| Source | idle_vm.go |
Where it applies
A running VM with flat CPU over the lookback
- resource.Status: statusSucceeded
- MetricsAware: azureCPUMetricName over azureCPULookbackDays days
CPU floor, memory and network guards
azureCPUThreshold=5.0, azureCPULookbackDays=30 (memory-bound guard at 60%, network idle guard at 1 MB bytes/bucket)Schedule on-demand, rightsize when committed
two branches, no fabricated fraction.
- OnDemand path → schedule (not a one-shot deallocate). A one-shot stop on a running VM is an indefinite outage, not a cost lever; idle or non-prod compute gets a recurring off-hours schedule. The dollar figure is the measured idle fraction from the aggregator’s heatmap (SetScheduleData, sd.IdlePercentage): savings = cost × sd.IdlePercentage, category schedule. The previous azureComputeOnlySavings × schedulingFallbackSavings (0.67) static fraction is removed; absent or zero schedule data => abstain (returns nil), never a flat fraction, never $0.
- Committed (RI/SP) path → rightsize. Deallocation saves nothing (commitment bills regardless), so the rule rightsizes via catalog-diff (srcRate − dstRate) × 730 (idleVMRightsizeSavings → DeriveCatalogDiffSavings(…, 0)) with no flat-fraction fallback; it abstains when either rate is absent/≤0 (azureIdleRightsizingSavingsFraction 0.75 lingers in constants.go but is not consumed on this path), category rightsizing. Description notes “managed disk storage continues to bill”. Both paths abstain when pricing is absent (cost ≤ 0). EvalContextRule: a VM with a known active schedule or measured-and-near-off uptime (long-off hysteresis) is suppressed.
Scheduling off hours instead of leaving it stopped
- Review Azure Monitor CPU, memory, and network metrics for this VM
- Verify no workloads depend on this VM
- Apply the recommended recurring off-hours schedule (auto start/stop); do not leave it deallocated indefinitely
- Note that managed disk storage keeps billing while the VM is stopped
The single CPU series this rule reads
azureCPUMetricName (azureCPULookbackDays day lookback)