Azure Spot VM Opportunity
What does ZopNight detect here?
On-demand Azure VMs with positive dev/test classification are recommended for Spot priority: an env tag, name, or resource-group signal, with env=prod as absolute veto. Savings multiply cost by 1 − Spot/OnDemand from live rates, banded to [0.05, 0.92]; unpriced SKUs, Windows/SQL Server, and DR/standby VMs abstain.
Signal and threshold
| Field | Value |
|---|---|
| Rule IDs | RC-210 |
| Category | discount |
| Severity | low |
| Metric | none — pure configuration read |
| Source | spot_vm.go |
Where it applies
Which dev/test VMs are safe to preempt
- resource.Status: statusSucceeded
- tag: priority=Spot (already-Spot skip)
- Non-prod classification (2026-06-27 fix): gate is isNonProdResource(resource), not a bare name check. An explicit env=prod tag is an absolute veto ahead of the dev/test signal; otherwise a dev/test env tag, a dev/test resource name, or a dev/test resource-group name (azure/helpers.go) qualifies. Mirrors the RC-1381 (ri_to_spot.go) gate.
- ReservationCoverage (RI/SP skip), stateful-workload veto (matchesStatefulWorkload)
- critical-role name veto (#1906 B2): matchesCriticalRole skips DR / standby VMs (criticalRolePatterns = dr, standby, segment-boundary regex in azure/helpers.go), and a preemption during failover is a production outage.
- OS/license veto (#1906 B4): isSpotIncompatibleOS skips Windows / SQL-Server VMs (spotIncompatibleOSFamilies = windows, sql-server, read from Metadata[“os_family”]/platform); an absent OS signal abstains. Declares Mechanism()=“spot” → covered by cross-rec exclusivity.
Pricing the gap between Spot and on-demand rates
single-category cost-driven discount. Savings quantified strictly from live tier rates: frac = 1 − Spot/OnDemand, sanity-banded [0.05, 0.92] (spotFractionFromTiers, rate-inversion guarded); SavingsUSD = cost × frac. RC-210 fires on a dev/test name plus on-demand pricing alone (no observed utilization / authoritative env evidence), so the previous flat ~90% fallback fabricated a magnitude off a customer-controlled name and is removed. When the aggregator has not priced the SKU’s OnDemand/Spot rates (ok=false) or pricing is absent (cost ≤ 0) the rule abstains (returns nil) instead of emitting a $0 “advisory” rec.
Confirming the workload is non-production
- Verify this is a non-production workload
Why CPU and network are evidence, not a gate
CPUUtilization + VMNetworkIn (30d): evidence only; do not gate firing or savings