Skip to content

Commit 4989b30

Browse files
committed
Add runtime logs how-to guide
1 parent b821816 commit 4989b30

File tree

2 files changed

+26
-42
lines changed

2 files changed

+26
-42
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ Azure Event Hubs supports the following dimensions for metrics in Azure Monitor.
8585

8686

8787
## Runtime audit logs
88-
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.
88+
Runtime audit logs capture aggregated diagnostic information for all data plane access operations (such as send or receive events) in Event Hubs.
8989

9090
> [!NOTE]
91-
> Runtime audit logs are currently available only in **premium** and **dedicated** tiers.
91+
> Runtime audit logs are available only in **premium** and **dedicated** tiers.
9292
9393
Runtime audit logs include the elements listed in the following table:
9494

@@ -132,7 +132,7 @@ Here's an example of a runtime audit log entry:
132132
Application metrics logs capture the aggregated information on certain metrics related to data plane operations. The captured information includes the following runtime metrics.
133133

134134
> [!NOTE]
135-
> Application metrics logs are currently available only in **premium** and **dedicated** tiers.
135+
> Application metrics logs are available only in **premium** and **dedicated** tiers.
136136
137137
Name | Description
138138
------- | -------

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

Lines changed: 23 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -134,75 +134,59 @@ Following are sample queries that you can use to help you monitor your Azure Eve
134134
135135
```
136136
137-
## Using Runtime logs
137+
## Using Runtime logs
138138
139-
Runtime audit logs capture aggregated diagnostic information for all data plane access operations
139+
Azure Event Hubs allows you to monitor and audit data plane interactions of your client applications using runtime audit logs and application metrics logs.
140+
141+
Using *Runtime audit logs* you can capture aggregated diagnostic information for all data plane access operations such as publishing or comsuming events.
142+
*Application metrics logs* capture the aggregated data on certain runtime metrics (such as consumer lag and active connections) related to client applications are connected to Event Hubs.
143+
144+
> [!NOTE]
145+
> Runtime audit logs are available only in **premium** and **dedicated** tiers.
140146
141147
### Enabling Runtime logs
142-
Azure Event Hubs
148+
You can enable either runtime audit logs or application metrics logs by selecting *Diagnostic settings* from the *Monitoring* section on the Event Hubs namespace page in Azure Portal. Click on *Add diagnostic setting* as shown below.
143149
144150
![Metrics Explorer with Event Hubs namespace selected](./media/monitor-event-hubs/add-diagnostic-settings.png)
145151
146-
Azure Event Hubs
152+
Then you can enable log categories *RuntimeAuditLogs* or *ApplicationMetricsLogs* as needed.
147153
![Metrics Explorer with Event Hubs namespace selected](./media/monitor-event-hubs/configure-diagnostic-settings.png)
148154
155+
Once runtime logs are enabled, Event Hubs will start collecting and storing them according to the diagnostic setting configuration.
149156
150157
### Publishing and consuming sample data
151-
Azure Event Hubs
152-
153-
Publish data using Event Hubs SDK (AMQP)
154-
155-
Consume data using Event Hubs SDK
156-
157-
158-
159-
160-
Query logs using:
161-
162-
163-
164-
165-
166-
158+
To collect sample runtime audit logs in your Event Hubs namespace, you can publish and consume sample data using client applications which are based on [Event Hubs SDK](../event-hubs/event-hubs-dotnet-standard-getstarted-send.md) (AMQP) or using any [Apache Kafka client application](../event-hubs/event-hubs-quickstart-kafka-enabled-event-hubs.md).
167159
168160
169161
### Analyzing Runtime Audit logs
162+
You can analyze the collected runtime audit logs using the following sample query.
170163
164+
```kusto
171165
AzureDiagnostics
172166
| where TimeGenerated > ago(1h)
173-
| where ResourceProvider =="MICROSOFT.EVENTHUB"
167+
| where ResourceProvider == "MICROSOFT.EVENTHUB"
174168
| where Category == "RuntimeAuditLogs"
175-
176-
177-
Azure Event Hubs
169+
```
170+
Up on the execution of the query you should be able to obtain corresponding audit logs in the following format.
178171
![Metrics Explorer with Event Hubs namespace selected](./media/monitor-event-hubs/runtime-audit-logs.png)
179172

173+
By analyzing these logs you should be able to audit how each client application interacts with Event Hubs. Each feild associated with runtime audit logs are defined in [runtime audit logs reference](../event-hubs/monitor-event-hubs-reference.md#runtime-audit-logs).
180174

181175

182176
### Analyzing Application metrics
183-
Application metrics logs capture the aggregated information on certain metrics related to data plane operations. The captured information includes the following runtime metrics.
184-
177+
You can analyze the collected application metrics logs using the following sample query.
185178

179+
```kusto
186180
AzureDiagnostics
187181
| where TimeGenerated > ago(1h)
188182
| where Category == "ApplicationMetricsLogs"
189-
183+
```
184+
Application metrics includes the following runtime metrics.
190185
![Metrics Explorer with Event Hubs namespace selected](./media/monitor-event-hubs/application-metrics-logs.png)
191186

187+
Therefore you can use application metrics to monitor runtime metrics such as consumer lag or active connection from a given client application. Each feild associated with runtime audit logs are defined in [applicaiton metrics logs reference](../event-hubs/monitor-event-hubs-reference.md#runtime-audit-logs).
192188

193189

194-
195-
resources:
196-
197-
+ Get errors fro
198-
199-
200-
201-
df
202-
203-
204-
205-
206190
## Alerts
207191
You can access alerts for Azure Event Hubs by selecting **Alerts** from the **Azure Monitor** section on the home page for your Event Hubs namespace. See [Create, view, and manage metric alerts using Azure Monitor](../azure-monitor/alerts/alerts-metric.md) for details on creating alerts.
208192

0 commit comments

Comments
 (0)