@@ -124,6 +124,8 @@ For a detailed reference of the logs and metrics, see [Azure Service Bus monitor
124
124
125
125
Following are sample queries that you can use to help you monitor your Azure Service Bus resources:
126
126
127
+ ### [ AzureDiagnostics] ( #tab/AzureDiagnostics )
128
+
127
129
+ Get management operations in the last 7 days.
128
130
129
131
``` Kusto
@@ -141,8 +143,6 @@ Following are sample queries that you can use to help you monitor your Azure Ser
141
143
| where ResourceProvider =="MICROSOFT.SERVICEBUS"
142
144
| where Category == "RuntimeAuditLogs"
143
145
```
144
-
145
-
146
146
+ Get access attempts to a key vault that resulted in "key not found" error.
147
147
148
148
```Kusto
@@ -180,7 +180,47 @@ Following are sample queries that you can use to help you monitor your Azure Ser
180
180
| where EventName_s startswith "AutoDelete"
181
181
| summarize count() by EventName_s, _ResourceId
182
182
```
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
+
184
224
## Alerts
185
225
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.
186
226
0 commit comments