Service Bus namespaces whose queues and topics moved no messages
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
| Field | Value |
|---|---|
| Rule IDs | RC-1377 |
| Category | idle |
| Severity | medium |
| Metric | IncomingMessages, OutgoingMessages |
| Threshold | average = 0 on every reported series |
| Evaluation window | 30d |
| Source | ZopNight |
| Permissions used | Microsoft.ServiceBus/namespaces/read · Microsoft.Insights/Metrics/Read |
Where it applies
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
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 TotalPortal: 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
- At least one of the incoming or outgoing message series is present.
- Every series that is present has an average of zero.
- At least one present series covers 7 days or more, so a namespace that was just created or recreated is not judged too early.
- 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
saving = current monthly cost of the namespacecost after fix = 0Removing an idle namespace
- List queues, topics and subscriptions and check dead-letter queues for messages worth keeping.
- Search application settings and Key Vault for the namespace’s connection string, and check for a geo-disaster-recovery alias.
- Delete it:
az servicebus namespace delete --resource-group my-rg --name my-namespace. - If the namespace is needed but only lightly used, consider whether the Basic tier’s features are enough before paying a Standard base charge.