Skip to main content
idle · azure

Service Bus namespaces whose queues and topics moved no messages

resource types
1
rule IDs covered
1
severity
medium

What does ZopNight detect here?

ZopNight flags an Azure Service Bus namespace when every reported message series, `IncomingMessages` and `OutgoingMessages`, averages zero, with at least 7 days of data and a known cost. Standard namespaces pay an hourly base charge and Premium pays per hour for its capacity, so a namespace nobody sends to still bills every hour.

Signal and threshold

How ZopNight evaluates Service Bus namespaces whose queues and topics moved no messages.
Field Value
Rule IDsRC-1377
Categoryidle
Severitymedium
MetricIncomingMessages, OutgoingMessages
Thresholdaverage = 0 on every reported series
Evaluation window30d
SourceZopNight
Permissions usedMicrosoft.ServiceBus/namespaces/read · Microsoft.Insights/Metrics/Read

Which Service Bus tiers bill without traffic

Service Bus pricing comes in three tiers. Basic is charged per million operations, so an idle Basic namespace costs close to nothing. Standard adds an hourly base charge, which includes the first 13 million operations a month and 1,000 brokered connections. Premium runs on dedicated resources and is billed by the hour.

Standard and Premium are therefore the tiers where an abandoned namespace keeps costing money: the base or hourly charge runs whether or not a single message is sent.

Looking at message counts in a namespace

Terminal window
az servicebus namespace list \
--query "[].{name:name, rg:resourceGroup, sku:sku.name}" -o table
az monitor metrics list --resource <namespace-resource-id> \
--metric IncomingMessages OutgoingMessages --offset 30d --interval PT24H --aggregation Total

Portal: the namespace’s Queues and Topics blades show message counts per entity, useful for spotting the one queue that still gets traffic.

How ZopNight reads an idle namespace

  1. At least one of the incoming or outgoing message series is present.
  2. Every series that is present has an average of zero.
  3. At least one present series covers 7 days or more, so a namespace that was just created or recreated is not judged too early.
  4. The namespace has a known monthly cost above zero.

Namespaces that are not flagged

If neither message series is reported, there is no finding. Any non-zero average on a reported series clears the namespace. A namespace with no cost in ZopNight’s billing data, which is typical for a quiet Basic namespace, has nothing to save and is left alone. Unlike the Event Hubs check, this one looks at averages rather than peaks, which is why rare batch namespaces are the usual false positive.

The namespace charge is the saving

Terminal window
saving = current monthly cost of the namespace
cost after fix = 0

Removing an idle namespace

  1. List queues, topics and subscriptions and check dead-letter queues for messages worth keeping.
  2. Search application settings and Key Vault for the namespace’s connection string, and check for a geo-disaster-recovery alias.
  3. Delete it: az servicebus namespace delete --resource-group my-rg --name my-namespace.
  4. If the namespace is needed but only lightly used, consider whether the Basic tier’s features are enough before paying a Standard base charge.

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·