Skip to main content
idle · azure

Azure Batch accounts with no jobs, and why the cost sits in their pools

resource types
1
rule IDs covered
1
severity
low

What does ZopNight detect here?

An Azure Batch account itself costs nothing; Microsoft states there is no extra charge to use Batch and you pay only for the VMs, storage and networking behind it. ZopNight therefore raises no finding on an idle Batch account. The spend to check is pool nodes left running, visible through `RunningNodeCount` and `az batch pool list`.

Signal and threshold

How ZopNight evaluates Azure Batch accounts with no jobs, and why the cost sits in their pools.
Field Value
Rule IDsRC-1375
Categoryidle
Severitylow
MetricRunningNodeCount, TaskCompleteEvent, JobStartEvent
Evaluation window30d
SourceZopNight
Permissions usedMicrosoft.Batch/batchAccounts/read · Microsoft.Batch/batchAccounts/pools/read · Microsoft.Insights/Metrics/Read

Where Batch money is actually spent

The Batch overview is explicit: there is no extra charge to use Batch, and you pay only for the underlying resources, such as virtual machines, storage and networking. The account is a free container for pools, jobs and tasks. The pools are where the bill comes from, because each compute node is a VM billed while it exists, whether or not a task is running on it.

An account with no jobs is therefore harmless on its own. An account with no jobs and a pool still holding dedicated nodes is not.

Finding pools that hold nodes with nothing to do

Terminal window
az batch pool list --account-name mybatch \
--account-endpoint https://mybatch.eastus.batch.azure.com \
--query "[].{id:id, vmSize:vmSize, dedicated:currentDedicatedNodes, spot:currentLowPriorityNodes, autoscale:enableAutoScale}" \
-o table
az monitor metrics list --resource <batch-account-resource-id> \
--metric RunningNodeCount JobStartEvent TaskCompleteEvent --offset 30d --interval PT24H --aggregation Total

Nodes present every day while JobStartEvent and TaskCompleteEvent stay at zero is the pattern to act on.

What ZopNight evaluates for a Batch account

ZopNight collects the account’s node, job start and task completion metrics over 30 days, but it does not turn them into a finding on the account. An account has no price of its own to recover, so any saving figure attached to it would be invented. Earlier logic that equated an idle account with its full cost was removed for exactly that reason.

Why this page never shows a finding

The honest answer to “what would deleting this idle account save?” is nothing. The saving, when there is one, belongs to the VMs in the pools. Those are evaluated by the VM-level checks such as Idle Azure VM and Idle Azure VM Scale Set, which price the compute that is actually billed.

No saving on the account itself

There is no dollar figure here. What you can save is the cost of the idle pool nodes, which the commands above let you see directly.

Stopping idle pools from billing

  1. Resize a fixed pool to zero between batches: az batch pool resize --pool-id mypool --target-dedicated-nodes 0 --target-low-priority-nodes 0.
  2. Better, enable autoscale on the pool with a formula based on pending tasks, so nodes appear only when there is work (az batch pool autoscale enable).
  3. Use Spot nodes for interruptible tasks to cut the rate on the nodes you do run.
  4. Delete pools and, if nothing uses it, the account once the workload has moved elsewhere.

See it fire on your bill.

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

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

472 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·