Skip to content

Commit e821c5e

Browse files
Merge pull request #239979 from Saglodha/patch-9
Update monitor-service-bus.md
2 parents de039ac + f403253 commit e821c5e

File tree

1 file changed

+52
-8
lines changed

1 file changed

+52
-8
lines changed

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

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,11 @@ 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

129-
```Kusto
131+
```kusto
130132
AzureDiagnostics
131133
| where TimeGenerated > ago(7d)
132134
| where ResourceProvider =="MICROSOFT.SERVICEBUS"
@@ -135,17 +137,15 @@ Following are sample queries that you can use to help you monitor your Azure Ser
135137
```
136138
+ Get runtime audit logs generated in the last one hour.
137139
138-
```Kusto
140+
```kusto
139141
AzureDiagnostics
140142
| where TimeGenerated > ago(1h)
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
148-
```Kusto
148+
```kusto
149149
AzureDiagnostics
150150
| where ResourceProvider == "MICROSOFT.SERVICEBUS"
151151
| 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
154154
155155
+ Get errors from the past 7 days
156156
157-
```Kusto
157+
```kusto
158158
AzureDiagnostics
159159
| where TimeGenerated > ago(7d)
160160
| where ResourceProvider =="MICROSOFT.SERVICEBUS"
@@ -164,7 +164,7 @@ Following are sample queries that you can use to help you monitor your Azure Ser
164164
165165
+ Get operations performed with a key vault to disable or restore the key.
166166
167-
```Kusto
167+
```kusto
168168
AzureDiagnostics
169169
| where ResourceProvider == "MICROSOFT.SERVICEBUS"
170170
| 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
180180
| where EventName_s startswith "AutoDelete"
181181
| summarize count() by EventName_s, _ResourceId
182182
```
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+
184228
## Alerts
185229
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.
186230

0 commit comments

Comments
 (0)