Skip to content

Commit d7fec1d

Browse files
authored
Merge pull request #185517 from kasun04/master
Add Runtime audit logs
2 parents 694a2d8 + 3fbeec3 commit d7fec1d

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

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

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,66 @@ Azure Event Hubs supports the following dimensions for metrics in Azure Monitor.
7979
[!INCLUDE [event-hubs-diagnostic-log-schema](./includes/event-hubs-diagnostic-log-schema.md)]
8080

8181

82+
## Runtime Audit Logs
83+
Runtime Audit Logs captures aggregated diagnostic logs for all data plane access operations (such as send or receive events) in Dedicated SKU.
84+
85+
> [!NOTE]
86+
> Runtime audit logs are currently available in *Dedicated* tier only.
87+
88+
Runtime Audit Logs include the elements listed in the following table:
89+
90+
Name | Description
91+
------- | -------
92+
`ActivityId` | A randomly generated UUID that ensures uniqueness for the audit activity.
93+
`ActivityName` | Runtime operation name.
94+
`ResourceId` | Resource associated with the activity.
95+
`Timestamp` | Aggregation time.
96+
`Status` | Status of the activity (success or failure).
97+
`Protocol` | Type of the protocol associated with the operation.
98+
`AuthType` | Type of authentication (AAD or SAS Policy).
99+
`AuthKey` | AAD application Id or SAS policy name which is used to authenticate to a resource.
100+
`NetworkType` | Type of the network: PublicNetworkAccess, PrivateNetworkAccess.
101+
`ClientIP` | IP address of client application.
102+
`Count` | Total number of operations performed during the aggregated period of 1 minute.
103+
`Properties` | Metadata that are specific to the data plane operation.
104+
`Category` | Log category
105+
106+
The following code is an example of a runtime audit log JSON string:
107+
108+
Example:
109+
110+
```json
111+
{
112+
"ActivityId": "<activity id>",
113+
"ActivityName": "ConnectionOpen | Authenticate | SendMessage | ReceiveMessage | GetRuntimeInfo",
114+
"ResourceId": "/SUBSCRIPTIONS/xxx/RESOURCEGROUPS/<Resource Group Name>/PROVIDERS/MICROSOFT.EVENTHUB/NAMESPACES/<Event Hubs namespace>/eventhubs/<event hub name>",
115+
"Time": "1/1/2021 8:40:06 PM +00:00",
116+
"Status": "Success | Failure",
117+
"Protocol": "AMQP | KAFKA | HTTP | Web Sockets",
118+
"AuthType": "SAS | AAD",
119+
"AuthId": "<app name | SAS policy name>",
120+
"NetworkType": "PublicNetworkAccess | PrivateNetworkAccess",
121+
"ClientIp": "x.x.x.x",
122+
"Count": 1,
123+
"Properties": {
124+
"key1": "value1",
125+
"key2": "value2"
126+
},
127+
"Category": "RuntimeAuditLogs"
128+
}
129+
130+
```
131+
132+
## Application Metrics Logs
133+
Application Metrics Logs captures the aggregated information on certain metrics related data plane operations. This includes following runtime metrics.
134+
135+
Name | Description
136+
------- | -------
137+
ConsumerLag | Indicate the lag between the consumers and producers.
138+
NamespaceActiveConnections | Details of the active connections established from a client to Event Hub.
139+
GetRuntimeInfo | Obtain run time information from Event Hubs.
140+
GetPartitionRuntimeInfo | Obtain the approximate runtime information for a logical partition of an Event Hub.
141+
82142

83143
## Azure Monitor Logs tables
84144
Azure Event Hubs 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#event-hubs).

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,17 @@ Following are sample queries that you can use to help you monitor your Azure Eve
8989
| where ResourceProvider =="MICROSOFT.EVENTHUB"
9090
| where Category == "OperationalLogs"
9191
| summarize count() by "EventName"
92+
93+
+ Get runtime audit logs during last hour.
94+
95+
```Kusto
96+
AzureDiagnostics
97+
| where TimeGenerated > ago(1h)
98+
| where ResourceProvider =="MICROSOFT.EVENTHUB"
99+
| where Category == "RuntimeAuditLogs"
92100
```
93101
102+
94103
+ Get access attempts to a key vault that resulted in "key not found" error.
95104
96105
```Kusto

0 commit comments

Comments
 (0)