@@ -124,9 +124,11 @@ 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
- ``` Kusto
131
+ ``` kusto
130
132
AzureDiagnostics
131
133
| where TimeGenerated > ago(7d)
132
134
| where ResourceProvider =="MICROSOFT.SERVICEBUS"
@@ -135,17 +137,15 @@ Following are sample queries that you can use to help you monitor your Azure Ser
135
137
```
136
138
+ Get runtime audit logs generated in the last one hour.
137
139
138
- ```Kusto
140
+ ```kusto
139
141
AzureDiagnostics
140
142
| where TimeGenerated > ago(1h)
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
- ```Kusto
148
+ ```kusto
149
149
AzureDiagnostics
150
150
| where ResourceProvider == "MICROSOFT.SERVICEBUS"
151
151
| where Category == "Error" and OperationName == "wrapkey"
@@ -154,7 +154,7 @@ Following are sample queries that you can use to help you monitor your Azure Ser
154
154
155
155
+ Get errors from the past 7 days
156
156
157
- ```Kusto
157
+ ```kusto
158
158
AzureDiagnostics
159
159
| where TimeGenerated > ago(7d)
160
160
| where ResourceProvider =="MICROSOFT.SERVICEBUS"
@@ -164,7 +164,7 @@ Following are sample queries that you can use to help you monitor your Azure Ser
164
164
165
165
+ Get operations performed with a key vault to disable or restore the key.
166
166
167
- ```Kusto
167
+ ```kusto
168
168
AzureDiagnostics
169
169
| where ResourceProvider == "MICROSOFT.SERVICEBUS"
170
170
| where (Category == "info" and (OperationName == "disable" or OperationName == "restore"))
@@ -180,7 +180,51 @@ 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/Resourcespecifictable)
184
+
185
+ + Get deny connection events for namespace
186
+
187
+ ```kusto
188
+ AZMSVNetConnectionEvents
189
+ | extend NamespaceName = tostring(split(_ResourceId, "/")[8])
190
+ | where Provider =~ "ServiceBus"
191
+ | where Action == "Deny Connection"
192
+ | project Action, SubscriptionId, NamespaceName, AddressIp, Reason, Count
193
+ | summarize by Action, NamespaceName
194
+ ```
195
+
196
+ + Get failed operation logs for namespace
197
+
198
+ ```kusto
199
+ AZMSOperationalLogs
200
+ | extend NamespaceName = tostring(split(_ResourceId, "/")[8])
201
+ | where Provider =~ "ServiceBus"
202
+ | where isnotnull(NamespaceName) and Status != "Succeeded"
203
+ | project NamespaceName, ResourceId, EventName, Status, Caller, SubscriptionId
204
+ | summarize by NamespaceName, EventName
205
+ ```
206
+
207
+ + Get Send message events for namespace
208
+
209
+ ```kusto
210
+ AZMSRunTimeAuditLogs
211
+ | extend NamespaceInfo = tostring(split(_ResourceId, "/")[8])
212
+ | where Provider =~ "ServiceBus"
213
+ | where isnotnull(NamespaceInfo) and ActivityName = "SendMessage"
214
+ | project NamespaceInfo, ActivityName, Protocol, NetworkType, ClientIp, ResourceId
215
+ | summarize by NamespaceInfo, ActivityName
216
+ ```
217
+ + Get Failed authorization results for AAD
218
+
219
+ ```kusto
220
+ AZMSRunTimeAuditLogs
221
+ | extend NamespaceInfo = tostring(split(_ResourceId, "/")[8])
222
+ | where Provider =~ "ServiceBus"
223
+ | where isnotnull(NamespaceInfo) and isnotnull(AuthKey) and AuthType == "AAD" and Status != "Success"
224
+ | project NamespaceInfo, AuthKey, ActivityName, Protocol, NetworkType, ClientIp, ResourceId
225
+ | summarize by NamespaceInfo, AuthKey, ActivityName
226
+ ```
227
+
184
228
## Alerts
185
229
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
230
0 commit comments