Skip to content

Commit f10e8ee

Browse files
authored
Merge pull request #186965 from kasun04/master
Add Service Bus Runtime Audit Logs
2 parents fbf592c + 7feb955 commit f10e8ee

File tree

3 files changed

+59
-9
lines changed

3 files changed

+59
-9
lines changed

articles/event-hubs/monitor-event-hubs-reference.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Azure Event Hubs supports the following dimensions for metrics in Azure Monitor.
8080
[!INCLUDE [event-hubs-diagnostic-log-schema](./includes/event-hubs-diagnostic-log-schema.md)]
8181

8282

83-
## Runtime audit Logs
83+
## Runtime audit logs
8484
Runtime audit logs capture aggregated diagnostic information for all data plane access operations (such as send or receive events) in the Event Hubs dedicated cluster.
8585

8686
> [!NOTE]
@@ -98,7 +98,7 @@ Name | Description
9898
`Protocol` | Type of the protocol associated with the operation.
9999
`AuthType` | Type of authentication (Azure Active Directory or SAS Policy).
100100
`AuthKey` | Azure Active Directory application ID or SAS policy name that's used to authenticate to a resource.
101-
`NetworkType` | Type of the network access: `PublicNetworkAccess`, `PrivateNetworkAccess`.
101+
`NetworkType` | Type of the network access: `Public` or `Private`.
102102
`ClientIP` | IP address of the client application.
103103
`Count` | Total number of operations performed during the aggregated period of 1 minute.
104104
`Properties` | Metadata that are specific to the data plane operation.
@@ -109,20 +109,16 @@ Here's an example of a runtime audit log entry:
109109
```json
110110
{
111111
"ActivityId": "<activity id>",
112-
"ActivityName": "ConnectionOpen | Authenticate | SendMessage | ReceiveMessage | GetRuntimeInfo",
112+
"ActivityName": "ConnectionOpen | Authorization | SendMessage | ReceiveMessage",
113113
"ResourceId": "/SUBSCRIPTIONS/xxx/RESOURCEGROUPS/<Resource Group Name>/PROVIDERS/MICROSOFT.EVENTHUB/NAMESPACES/<Event Hubs namespace>/eventhubs/<event hub name>",
114114
"Time": "1/1/2021 8:40:06 PM +00:00",
115115
"Status": "Success | Failure",
116116
"Protocol": "AMQP | KAFKA | HTTP | Web Sockets",
117117
"AuthType": "SAS | Azure Active Directory",
118-
"AuthId": "<app name | SAS policy name>",
119-
"NetworkType": "PublicNetworkAccess | PrivateNetworkAccess",
118+
"AuthId": "<AAD application name | SAS policy name>",
119+
"NetworkType": "Public | Private",
120120
"ClientIp": "x.x.x.x",
121121
"Count": 1,
122-
"Properties": {
123-
"key1": "value1",
124-
"key2": "value2"
125-
},
126122
"Category": "RuntimeAuditLogs"
127123
}
128124

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

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,51 @@ The following management operations are captured in operational logs:
141141
> [!NOTE]
142142
> Currently, *Read* operations aren't tracked in the operational logs.
143143
144+
145+
## Runtime audit logs
146+
Runtime audit logs capture aggregated diagnostic information for all data plane access operations (such as send or receive messages) in Service Bus.
147+
148+
> [!NOTE]
149+
> Runtime audit logs are currently available only in the **premium** tier.
150+
151+
Runtime audit logs include the elements listed in the following table:
152+
153+
Name | Description
154+
------- | -------
155+
`ActivityId` | A randomly generated UUID that ensures uniqueness for the audit activity.
156+
`ActivityName` | Runtime operation name.
157+
`ResourceId` | Resource associated with the activity.
158+
`Timestamp` | Aggregation time.
159+
`Status` | Status of the activity (success or failure).
160+
`Protocol` | Type of the protocol associated with the operation.
161+
`AuthType` | Type of authentication (Azure Active Directory or SAS Policy).
162+
`AuthKey` | Azure Active Directory application ID or SAS policy name that's used to authenticate to a resource.
163+
`NetworkType` | Type of the network access: `Public` or`Private`.
164+
`ClientIP` | IP address of the client application.
165+
`Count` | Total number of operations performed during the aggregated period of 1 minute.
166+
`Properties` | Metadata that are specific to the data plane operation.
167+
`Category` | Log category
168+
169+
Here's an example of a runtime audit log entry:
170+
171+
```json
172+
{
173+
"ActivityId": "<activity id>",
174+
"ActivityName": "ConnectionOpen | Authorization | SendMessage | ReceiveMessage",
175+
"ResourceId": "/SUBSCRIPTIONS/xxx/RESOURCEGROUPS/<Resource Group Name>/PROVIDERS/MICROSOFT.SERVICEBUS/NAMESPACES/<Service Bus namespace>/servicebus/<service bus name>",
176+
"Time": "1/1/2021 8:40:06 PM +00:00",
177+
"Status": "Success | Failure",
178+
"Protocol": "AMQP | HTTP | SBMP",
179+
"AuthType": "SAS | AAD",
180+
"AuthId": "<AAD Application Name| SAS policy name>",
181+
"NetworkType": "Public | Private",
182+
"ClientIp": "x.x.x.x",
183+
"Count": 1,
184+
"Category": "RuntimeAuditLogs"
185+
}
186+
187+
```
188+
144189
## Azure Monitor Logs tables
145190
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).
146191

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,15 @@ Following are sample queries that you can use to help you monitor your Azure Ser
128128
| where Category == "OperationalLogs"
129129
| summarize count() by EventName_s, _ResourceId
130130
```
131+
+ Get runtime audit logs generated in the last one hour.
132+
133+
```Kusto
134+
AzureDiagnostics
135+
| where TimeGenerated > ago(1h)
136+
| where ResourceProvider =="MICROSOFT.SERVICEBUS"
137+
| where Category == "RuntimeAuditLogs"
138+
```
139+
131140
132141
+ Get access attempts to a key vault that resulted in "key not found" error.
133142

0 commit comments

Comments
 (0)