Skip to content

Commit 6c0771f

Browse files
authored
Update monitor-service-bus.md
Adding resource specific table queries
1 parent a5a97a8 commit 6c0771f

File tree

1 file changed

+43
-3
lines changed

1 file changed

+43
-3
lines changed

articles/service-bus-messaging/monitor-service-bus.md

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ For a detailed reference of the logs and metrics, see [Azure Service Bus monitor
124124
125125
Following are sample queries that you can use to help you monitor your Azure Service Bus resources:
126126

127+
### [AzureDiagnostics](#tab/AzureDiagnostics)
128+
127129
+ Get management operations in the last 7 days.
128130

129131
```Kusto
@@ -141,8 +143,6 @@ Following are sample queries that you can use to help you monitor your Azure Ser
141143
| where ResourceProvider =="MICROSOFT.SERVICEBUS"
142144
| where Category == "RuntimeAuditLogs"
143145
```
144-
145-
146146
+ Get access attempts to a key vault that resulted in "key not found" error.
147147
148148
```Kusto
@@ -180,7 +180,47 @@ Following are sample queries that you can use to help you monitor your Azure Ser
180180
| where EventName_s startswith "AutoDelete"
181181
| summarize count() by EventName_s, _ResourceId
182182
```
183-
183+
### [Resource Specific Table](#tab/Resource specific table)
184+
185+
+ Get deny connection events for namespace
186+
```kusto
187+
AZMSVNetConnectionEvents
188+
| extend NamespaceName = tostring(split(_ResourceId, "/")[8])
189+
| where Provider =~ "ServiceBus"
190+
| where Action == "Deny Connection"
191+
| project Action, SubscriptionId, NamespaceName, AddressIp, Reason, Count
192+
| summarize by Action, NamespaceName
193+
```
194+
195+
+ Get failed operation logs for namespace
196+
```kusto
197+
AZMSOperationalLogs
198+
| extend NamespaceName = tostring(split(_ResourceId, "/")[8])
199+
| where Provider =~ "ServiceBus"
200+
| where isnotnull(NamespaceName) and Status != "Succeeded"
201+
| project NamespaceName, ResourceId, EventName, Status, Caller, SubscriptionId
202+
| summarize by NamespaceName, EventName
203+
```
204+
205+
+ Get failed send message events for namespace
206+
```kusto
207+
AZMSRunTimeAuditLogs
208+
| extend NamespaceInfo = tostring(split(_ResourceId, "/")[8])
209+
| where Provider =~ "ServiceBus"
210+
| where isnotnull(NamespaceInfo) and Status != "Success" and ActivityName = "SendMessage"
211+
| project NamespaceInfo, ActivityName, Protocol, NetworkType, ClientIp, ResourceId
212+
| summarize by NamespaceInfo, ActivityName
213+
```
214+
+ Get Failed authorization results for SAS key
215+
```kusto
216+
AZMSRunTimeAuditLogs
217+
| extend NamespaceInfo = tostring(split(_ResourceId, "/")[8])
218+
| where Provider =~ "ServiceBus"
219+
| where isnotnull(NamespaceInfo) and isnotnull(AuthKey) and AuthType == "AAD" and Status != "Success"
220+
| project NamespaceInfo, AuthKey, ActivityName, Protocol, NetworkType, ClientIp, ResourceId
221+
| summarize by NamespaceInfo, AuthKey, ActivityName
222+
```
223+
184224
## Alerts
185225
You can access alerts for Azure Service Bus by selecting **Alerts** from the **Azure Monitor** section on the home page for your Service Bus namespace. See [Create, view, and manage metric alerts using Azure Monitor](../azure-monitor/alerts/alerts-metric.md) for details on creating alerts.
186226

0 commit comments

Comments
 (0)