You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/event-hubs/monitor-event-hubs.md
+44-3Lines changed: 44 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ If you use **Azure Storage** to store the diagnostic logging information, the in
48
48
If you use **Azure Event Hubs** to store the diagnostic logging information, the information is stored in Event Hubs instances named **insights-logs-operationlogs** and **insights-metrics-pt1m**. You can also select an existing event hub except for the event hub for which you are configuring diagnostic settings.
49
49
50
50
### Log Analytics
51
-
If you use **Log Analytics** to store the diagnostic logging information, the information is stored in tables named **AzureDiagnostics**and**AzureMetrics**.
51
+
If you use **Log Analytics** to store the diagnostic logging information, the information is stored in tables named **AzureDiagnostics**/**AzureMetrics** or **resource specific tables**
52
52
53
53
> [!IMPORTANT]
54
54
> Enabling these settings requires additional Azure services (storage account, event hub, or Log Analytics), which may increase your cost. To calculate an estimated cost, visit the [Azure pricing calculator](https://azure.microsoft.com/pricing/calculator).
@@ -88,6 +88,8 @@ For a detailed reference of the logs and metrics, see [Azure Event Hubs monitori
88
88
89
89
Following are sample queries that you can use to help you monitor your Azure Event Hubs resources:
90
90
91
+
### [AzureDiagnostics](#tab/AzureDiagnostics)
92
+
91
93
+ Get errors from the past seven days
92
94
93
95
```Kusto
@@ -105,8 +107,6 @@ Following are sample queries that you can use to help you monitor your Azure Eve
105
107
| where ResourceProvider =="MICROSOFT.EVENTHUB"
106
108
| where Category == "RuntimeAuditLogs"
107
109
```
108
-
109
-
110
110
+ Get access attempts to a key vault that resulted in "key not found" error.
111
111
112
112
```Kusto
@@ -131,9 +131,30 @@ Following are sample queries that you can use to help you monitor your Azure Eve
131
131
| where ResourceProvider == "MICROSOFT.EVENTHUB"
132
132
| where Category == "ArchiveLogs"
133
133
| summarize count() by "failures", "durationInSeconds"
134
+
```
135
+
136
+
### [Resource Specific Table](#tab/Resourcespecifictable)
134
137
138
+
139
+
+ Get Operational Logs for event hub resource for last 7 days
140
+
141
+
```Kusto
142
+
AZMSOperationalLogs
143
+
| where Timegenerated > ago(7d)
144
+
| where Provider == "EVENTHUB"
145
+
| where resourceId == "<Resource Id>" // Replace your resource Id
135
146
```
136
147
148
+
+ Get capture logs for event hub for last 7 days
149
+
150
+
```Kusto
151
+
AZMSArchiveLogs
152
+
| where EventhubName == "<Event Hub Name>" //Enter event hub entity name
153
+
| where TimeGenerated > ago(7d)
154
+
```
155
+
156
+
157
+
---
137
158
## Use runtime logs
138
159
139
160
Azure Event Hubs allows you to monitor and audit data plane interactions of your client applications using runtime audit logs and application metrics logs.
@@ -161,12 +182,22 @@ To collect sample runtime audit logs in your Event Hubs namespace, you can publi
161
182
### Analyze runtime audit logs
162
183
You can analyze the collected runtime audit logs using the following sample query.
### [Resource Specific Table](#tab/ResourcespecifictableforRuntimeAudit)
194
+
195
+
```kusto
196
+
AZMSRuntimeAuditLogs
197
+
| where TimeGenerated > ago(1h)
198
+
| where Provider == "EVENTHUB"
199
+
```
200
+
---
170
201
Up on the execution of the query you should be able to obtain corresponding audit logs in the following format.
171
202
:::image type="content" source="./media/monitor-event-hubs/runtime-audit-logs.png" alt-text="Image showing the result of a sample query to analyze runtime audit logs." lightbox="./media/monitor-event-hubs/runtime-audit-logs.png":::
172
203
@@ -176,12 +207,22 @@ By analyzing these logs you should be able to audit how each client application
176
207
### Analyze application metrics
177
208
You can analyze the collected application metrics logs using the following sample query.
### [Resource Specific Table](#tab/ResourcespecifictableforAppMetrics)
219
+
220
+
```kusto
221
+
AZMSApplicationMetricLogs
222
+
| where TimeGenerated > ago(1h)
223
+
| where Provider == "EVENTHUB"
224
+
```
225
+
---
185
226
Application metrics includes the following runtime metrics.
186
227
:::image type="content" source="./media/monitor-event-hubs/application-metrics-logs.png" alt-text="Image showing the result of a sample query to analyze application metrics." lightbox="./media/monitor-event-hubs/application-metrics-logs.png":::
0 commit comments