Skip to content

Commit 3afd168

Browse files
authored
Merge pull request #239799 from Saglodha/docs-editor/monitor-service-bus-reference-1685542218
Update monitor-service-bus-reference.md
2 parents dd55cc0 + 3b21807 commit 3afd168

File tree

2 files changed

+118
-43
lines changed

2 files changed

+118
-43
lines changed
35 KB
Loading

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

Lines changed: 118 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ ms.custom: subject-monitoring
66
ms.date: 10/11/2022
77
---
88

9-
109
# Monitoring Azure Service Bus data reference
1110
See [Monitoring Azure Service Bus](monitor-service-bus.md) for details on collecting and analyzing monitoring data for Azure Service Bus.
1211

@@ -97,25 +96,36 @@ This section lists the types of resource logs you can collect for Azure Service
9796

9897
- Operational logs
9998
- Virtual network and IP filtering logs
99+
- Runtime Audit logs
100+
101+
Azure Service Bus now has the capability to dispatch logs to either of two destination tables - Azure Diagnostic or [Resource specific tables](~/articles/azure-monitor/essentials/resource-logs.md) in Log Analytics. You could use the toggle available on Azure portal to choose destination tables.
102+
103+
:::image type="content" source="media/monitor-service-bus-reference/destination-table-toggle.png" alt-text="Screenshot of dialog box to set destination table." lightbox="media/monitor-service-bus-reference/destination-table-toggle.png":::
100104

101105
### Operational logs
102106
Operational log entries include elements listed in the following table:
103107

104-
| Name | Description |
105-
| ------- | ------- |
106-
| `ActivityId` | Internal ID, used to identify the specified activity |
107-
| `EventName` | Operation name |
108-
| `ResourceId` | Azure Resource Manager resource ID |
109-
| `SubscriptionId` | Subscription ID |
110-
| `EventTimeString` | Operation time |
111-
| `EventProperties` | Operation properties |
112-
| `Status` | Operation status |
113-
| `Caller` | Caller of operation (the Azure portal or management client) |
114-
| `Category` | OperationalLogs |
108+
| Name | Description | Supported in AzureDiagnostics | Supported in AZMSOperationalLogs (Resource Specific table)|
109+
| ------- | ------- |---| ---|
110+
| `ActivityId` | Internal ID, used to identify the specified activity | Yes | Yes|
111+
| `EventName` | Operation name | Yes | Yes|
112+
| `ResourceId` | Azure Resource Manager resource ID | Yes | Yes|
113+
| `SubscriptionId` | Subscription ID | Yes | Yes|
114+
| `EventtimeString`| Operation Time | Yes | No|
115+
| `TimeGenerated [UTC]`|Time of executed operation (in UTC)| No | Yes|
116+
| `EventProperties` | Operation properties | Yes | Yes|
117+
| `Status` | Operation status | Yes | Yes|
118+
| `Caller` | Caller of operation (the Azure portal or management client) | Yes | Yes|
119+
| `Provider`|Name of Service emitting the logs e.g., ServiceBus | No | Yes|
120+
| `Type `| Type of logs emitted | No | Yes|
121+
| `Category`| Log Category | Yes | No|
115122

116123
Here's an example of an operational log JSON string:
117124

125+
AzureDiagnostics:
126+
118127
```json
128+
119129
{
120130
"ActivityId": "0000000000-0000-0000-0000-00000000000000",
121131
"EventName": "Create Queue",
@@ -127,6 +137,28 @@ Here's an example of an operational log JSON string:
127137
"Caller": "ServiceBus Client",
128138
"category": "OperationalLogs"
129139
}
140+
141+
142+
```
143+
Resource specific table entry:
144+
145+
```json
146+
147+
{
148+
149+
"ActivityId": "0000000000-0000-0000-0000-00000000000000",
150+
"EventName": "Retrieve Queue",
151+
"resourceId": "/SUBSCRIPTIONS/<AZURE SUBSCRPTION ID>/RESOURCEGROUPS/<RESOURCE GROUP NAME>/PROVIDERS/MICROSOFT.SERVICEBUS/NAMESPACES/<SERVICE BUS NAMESPACE NAME>",
152+
"SubscriptionId": "0000000000-0000-0000-0000-00000000000000",
153+
"TimeGenerated(UTC)": "9/28/2023 8:40:06 PM +00:00",
154+
"EventProperties": "{\"SubscriptionId\":\"0000000000-0000-0000-0000-00000000000000\",\"Namespace\":\"mynamespace\",\"Via\":\"https://mynamespace.servicebus.windows.net/f8096791adb448579ee83d30e006a13e/?api-version=2016-07\",\"TrackingId\":\"5ee74c9e-72b5-4e98-97c4-08a62e56e221_G1\"}",
155+
"Status": "Succeeded",
156+
"Caller": "ServiceBus Client",
157+
"type": "AZMSOperationalLogs",
158+
"Provider" : "SERVICEBUS"
159+
160+
}
161+
130162
```
131163

132164
### Events and operations captured in operational logs
@@ -137,35 +169,41 @@ Operational logs capture all management operations that are performed on the Azu
137169
138170
The following management operations are captured in operational logs:
139171

140-
| Scope | Operation|
141-
|-------| -------- |
142-
| `Namespace` | <ul> <li> Create Namespace</li> <li> Update Namespace </li> <li> Delete Namespace </li> <li> Update Namespace SharedAccess Policy </li> </ul> |
143-
| `Queue` | <ul> <li> Create Queue</li> <li> Update Queue</li> <li> Delete Queue </li> <li> AutoDelete Delete Queue </li> </ul> |
144-
| `Topic` | <ul> <li> Create Topic </li> <li> Update Topic </li> <li> Delete Topic </li> <li> AutoDelete Delete Topic </li> </ul> |
145-
| `Subscription` | <ul> <li> Create Subscription </li> <li> Update Subscription </li> <li> Delete Subscription </li> <li> AutoDelete Delete Subscription </li> </ul> |
172+
| Scope | Operation |
173+
|-------|-----------|
174+
| Namespace | - Create Namespace<br>- Update Namespace<br>- Delete Namespace<br>- Update Namespace<br>- Retrieve Namespace<br>- SharedAccess Policy |
175+
| Queue | - Create Queue<br>- Update Queue<br>- Delete Queue<br>- AutoDelete Delete Queue<br>- Retrieve Queue |
176+
| Topic | - Create Topic<br>- Update Topic<br>- Delete Topic<br>- AutoDelete Delete Topic<br>- Retrieve Topic |
177+
| Subscription | - Create Subscription<br>- Update Subscription<br>- Delete Subscription<br>- AutoDelete Delete Subscription<br>- Retrieve Subscription |
178+
146179

147180
> [!NOTE]
148181
> Currently, *Read* operations aren't tracked in the operational logs.
149182
150183
### Virtual network and IP filtering logs
151184
Service Bus virtual network (VNet) connection event JSON includes elements listed in the following table:
152185

153-
| Name | Description |
154-
| --- | ----------- |
155-
| `SubscriptionId` | Azure subscription ID |
156-
| `NamespaceName` | Namespace name |
157-
| `IPAddress` | IP address of a client connecting to the Service Bus service |
158-
| `Action` | Action done by the Service Bus service when evaluating connection requests. Supported actions are **Accept Connection** and **Deny Connection**. |
159-
| `Reason` | Provides a reason why the action was done |
160-
| `Count` | Number of occurrences for the given action |
161-
| `ResourceId` | Azure Resource Manager resource ID. |
162-
| `Category` | ServiceBusVNetConnectionEvent |
186+
| Name | Description | Supported in Azure Diagnostics | Supported in AZMSVnetConnectionEvents (Resource specific table)
187+
| --- | ----------- |---| ---|
188+
| `SubscriptionId` | Azure subscription ID | Yes | Yes
189+
| `NamespaceName` | Namespace name | Yes | Yes
190+
| `IPAddress` | IP address of a client connecting to the Service Bus service | Yes | Yes
191+
| `AddressIP` | IP address of client connecting to service bus | Yes | Yes
192+
| `TimeGenerated [UTC]`|Time of executed operation (in UTC) | Yes | Yes
193+
| `Action` | Action done by the Service Bus service when evaluating connection requests. Supported actions are **Accept Connection** and **Deny Connection**. | Yes | Yes
194+
| `Reason` | Provides a reason why the action was done | Yes | Yes
195+
| `Count` | Number of occurrences for the given action | Yes | Yes
196+
| `ResourceId` | Azure Resource Manager resource ID. | Yes | Yes
197+
| `Category` | Log Category | Yes | No
198+
| `Provider`|Name of Service emitting the logs e.g., ServiceBus | No | Yes
199+
| `Type` | Type of Logs Emitted | No | Yes
163200

164201
> [!NOTE]
165202
> Virtual network logs are generated only if the namespace allows access from selected networks or from specific IP addresses (IP filter rules).
166203
167204
Here's an example of a virtual network log JSON string:
168205

206+
AzureDiagnostics;
169207
```json
170208
{
171209
"SubscriptionId": "0000000-0000-0000-0000-000000000000",
@@ -178,6 +216,20 @@ Here's an example of a virtual network log JSON string:
178216
"Category": "ServiceBusVNetConnectionEvent"
179217
}
180218
```
219+
Resource specific table entry:
220+
```json
221+
{
222+
"SubscriptionId": "0000000-0000-0000-0000-000000000000",
223+
"NamespaceName": "namespace-name",
224+
"AddressIp": "1.2.3.4",
225+
"Action": "Accept Connection",
226+
"Message": "IP is accepted by IPAddress filter.",
227+
"Count": 1,
228+
"ResourceId": "/SUBSCRIPTIONS/<AZURE SUBSCRPTION ID>/RESOURCEGROUPS/<RESOURCE GROUP NAME>/PROVIDERS/MICROSOFT.SERVICEBUS/NAMESPACES/<SERVICE BUS NAMESPACE NAME>",
229+
"Provider" : "SERVICEBUS",
230+
"Type": "AZMSVNetConnectionEvents"
231+
}
232+
```
181233

182234
## Runtime audit logs
183235
Runtime audit logs capture aggregated diagnostic information for various data plane access operations (such as send or receive messages) in Service Bus.
@@ -187,24 +239,28 @@ Runtime audit logs capture aggregated diagnostic information for various data pl
187239
188240
Runtime audit logs include the elements listed in the following table:
189241

190-
Name | Description
191-
------- | -------
192-
`ActivityId` | A randomly generated UUID that ensures uniqueness for the audit activity.
193-
`ActivityName` | Runtime operation name.
194-
`ResourceId` | Resource associated with the activity.
195-
`Timestamp` | Aggregation time.
196-
`Status` | Status of the activity (success or failure).
197-
`Protocol` | Type of the protocol associated with the operation.
198-
`AuthType` | Type of authentication (Azure Active Directory or SAS Policy).
199-
`AuthKey` | Azure Active Directory application ID or SAS policy name that's used to authenticate to a resource.
200-
`NetworkType` | Type of the network access: `Public` or`Private`.
201-
`ClientIP` | IP address of the client application.
202-
`Count` | Total number of operations performed during the aggregated period of 1 minute.
203-
`Properties` | Metadata that is specific to the data plane operation.
204-
`Category` | Log category
242+
Name | Description | Supported in Azure Diagnostics | Supported in AZMSRuntimeAuditLogs (Resource specific table)
243+
------- | -------| ---|---|
244+
`ActivityId` | A randomly generated UUID that ensures uniqueness for the audit activity. | Yes | Yes
245+
`ActivityName` | Runtime operation name. | Yes | Yes
246+
`ResourceId` | Resource associated with the activity. | Yes | Yes
247+
`Timestamp` | Aggregation time. | Yes | No
248+
`time Generated (UTC)` | Aggregated time | No | Yes
249+
`Status` | Status of the activity (success or failure).| Yes | Yes
250+
`Protocol` | Type of the protocol associated with the operation. | Yes | Yes
251+
`AuthType` | Type of authentication (Azure Active Directory or SAS Policy). | Yes | Yes
252+
`AuthKey` | Azure Active Directory application ID or SAS policy name that's used to authenticate to a resource. | Yes | Yes
253+
`NetworkType` | Type of the network access: `Public` or`Private`. | yes | Yes
254+
`ClientIP` | IP address of the client application. | Yes | Yes
255+
`Count` | Total number of operations performed during the aggregated period of 1 minute. | Yes | Yes
256+
`Properties` | Metadata that is specific to the data plane operation. | yes | Yes
257+
`Category` | Log category | Yes | No
258+
`Provider`|Name of Service emitting the logs e.g., ServiceBus | No | Yes
259+
`Type` | Type of Logs emitted | No | Yes
205260

206261
Here's an example of a runtime audit log entry:
207262

263+
AzureDiagnostics:
208264
```json
209265
{
210266
"ActivityId": "<activity id>",
@@ -222,10 +278,29 @@ Here's an example of a runtime audit log entry:
222278
}
223279

224280
```
281+
Resource specific table entry:
282+
```json
283+
{
284+
"ActivityId": "<activity id>",
285+
"ActivityName": "ConnectionOpen | Authorization | SendMessage | ReceiveMessage",
286+
"ResourceId": "/SUBSCRIPTIONS/xxx/RESOURCEGROUPS/<Resource Group Name>/PROVIDERS/MICROSOFT.SERVICEBUS/NAMESPACES/<Service Bus namespace>/servicebus/<service bus name>",
287+
"TimeGenerated (UTC)": "1/1/2021 8:40:06 PM +00:00",
288+
"Status": "Success | Failure",
289+
"Protocol": "AMQP | HTTP | SBMP",
290+
"AuthType": "SAS | AAD",
291+
"AuthKey": "<AAD Application Name| SAS policy name>",
292+
"NetworkType": "Public | Private",
293+
"ClientIp": "x.x.x.x",
294+
"Count": 1,
295+
"Provider": "SERVICEBUS",
296+
"Type" : "AZMSRuntimeAuditLogs"
297+
}
225298

299+
```
226300
## Azure Monitor Logs tables
227301
Azure Service Bus uses Kusto tables from Azure Monitor Logs. You can query these tables with Log Analytics. For a list of Kusto tables the service uses, see [Azure Monitor Logs table reference](/azure/azure-monitor/reference/tables/tables-resourcetype#service-bus).
228302

229303
## Next steps
230304
- For details on monitoring Azure Service Bus, see [Monitoring Azure Service Bus](monitor-service-bus.md).
231305
- For details on monitoring Azure resources, see [Monitoring Azure resources with Azure Monitor](../azure-monitor/essentials/monitor-azure-resource.md).
306+

0 commit comments

Comments
 (0)