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/event-hubs-diagnostic-logs.md
+92-27Lines changed: 92 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,55 +15,54 @@ ms.topic: article
15
15
ms.tgt_pltfrm: na
16
16
ms.workload: data-services
17
17
ms.custom: seodec18
18
-
ms.date: 12/06/2018
18
+
ms.date: 04/28/2020
19
19
ms.author: shvija
20
20
21
21
---
22
22
# Set up diagnostic logs for an Azure event hub
23
23
24
24
You can view two types of logs for Azure Event Hubs:
25
25
26
-
***[Activity logs](../azure-monitor/platform/platform-logs-overview.md)**: These logs have information about operations performed on a job. The logs are always enabled.
26
+
***[Activity logs](../azure-monitor/platform/platform-logs-overview.md)**: These logs have information about operations done on a job. The logs are always enabled. You can see activity log entries by selecting **Activity log** in the left pane for your event hub namespace in the Azure portal. For example: "Create or Update Namespace", "Create or Update Event Hub".
27
+
28
+

27
29
***[Diagnostic logs](../azure-monitor/platform/platform-logs-overview.md)**: You can configure diagnostic logs for a richer view of everything that happens with a job. Diagnostic logs cover activities from the time the job is created until the job is deleted, including updates and activities that occur while the job is running.
28
30
29
-
## Enable diagnostic logs
31
+
The following section shows you how to enable diagnostic logs for an Event Hubs namespace.
30
32
33
+
## Enable diagnostic logs
31
34
Diagnostic logs are disabled by default. To enable diagnostic logs, follow these steps:
32
35
33
-
1. In the [Azure portal](https://portal.azure.com), under **Monitoring + Management**, click **Diagnostics logs**.
34
-
35
-

36
-
37
-
2. Click the resource you want to monitor.
38
-
39
-
3. Click **Turn on diagnostics**.
36
+
1. In the [Azure portal](https://portal.azure.com), navigate to your Event Hubs namespace.
37
+
2. Select **Diagnostics settings** under **Monitoring** in the left pane, and then select **+ Add diagnostic setting**.
40
38
41
-

4. In the **Category details** section, select the **types of diagnostic logs** that you want to enable. You'll find details about these categories later in this article.
41
+
5. In the **Destination details** section, set the archive target (destination) that you want; for example, a storage account, an event hub, or a Log Analytics workspace.
6. Select **Save** on the toolbar to save the diagnostics settings.
44
45
45
-

46
+
New settings take effect in about 10 minutes. After that, logs appear in the configured archival target, in the **Diagnostics logs** pane.
46
47
47
-
5. Set the archive target that you want; for example, a storage account, an event hub, or Azure Monitor logs.
48
-
49
-
6. Save the new diagnostics settings.
50
-
51
-
New settings take effect in about 10 minutes. After that, logs appear in the configured archival target, in the **Diagnostics logs** pane.
52
-
53
-
For more information about configuring diagnostics, see the [overview of Azure diagnostic logs](../azure-monitor/platform/platform-logs-overview.md).
48
+
For more information about configuring diagnostics, see the [overview of Azure diagnostic logs](../azure-monitor/platform/platform-logs-overview.md).
54
49
55
50
## Diagnostic logs categories
56
51
57
-
Event Hubs captures diagnostic logs for two categories:
52
+
Event Hubs captures diagnostic logs for the following categories:
58
53
59
-
***Archive Logs**: logs related to Event Hubs archives, specifically, logs related to archive errors.
60
-
***Operational Logs**: information about what is happening during Event Hubs operations, specifically, the operation type, including event hub creation, resources used, and the status of the operation.
54
+
-**Archive Logs**: logs related to Event Hubs archives, specifically, logs related to archive errors.
55
+
-**Operational Logs**: information about what is happening during Event Hubs operations, specifically, the operation type, including event hub creation, resources used, and the status of the operation.
56
+
-**Auto scale logs**: information about autoscaling operations done on an Event Hubs namespace.
57
+
-**Kafka coordinator logs** - information about Kafka coordinator operations related to Event Hubs.
58
+
-**Kafka user logs**: information about Kafka user operations related to Event Hubs.
59
+
-**Event Hubs virtual network (VNet) connection event**: information about Event Hubs virtual network connection events.
60
+
-**Customer-managed key user logs**: information about operations related to customer-managed key.
61
61
62
-
## Diagnostic logs schema
63
62
64
-
All logs are stored in JavaScript Object Notation (JSON) format. Each entry has string fields that use the format described in the following sections.
63
+
All logs are stored in JavaScript Object Notation (JSON) format. Each entry has string fields that use the format described in the following sections.
65
64
66
-
###Archive logs schema
65
+
## Archive logs schema
67
66
68
67
Archive log JSON strings include elements listed in the following table:
69
68
@@ -101,7 +100,7 @@ The following code is an example of an archive log JSON string:
101
100
}
102
101
```
103
102
104
-
###Operational logs schema
103
+
## Operational logs schema
105
104
106
105
Operational log JSON strings include elements listed in the following table:
107
106
@@ -134,6 +133,72 @@ Example:
134
133
}
135
134
```
136
135
136
+
## Autoscale logs schema
137
+
Autoscale log JSON includes elements listed in the following table:
138
+
139
+
| Name | Description |
140
+
| ---- | ----------- |
141
+
| trackingId | Internal ID, which is used for tracing purposes |
142
+
| resourceId | Internal ID, which contains Azure subscription ID and namespace name |
143
+
| message | Informational message, which provides details about auto-inflate action. The message contains previous and current value of throughput unit for a given namespace and what triggered the inflate of the TU. |
144
+
145
+
## Kafka coordinator logs schema
146
+
Kafka coordinator log JSON includes elements listed in the following table:
147
+
148
+
| Name | Description |
149
+
| ---- | ----------- |
150
+
| requestId | request ID, which is used for tracing purposes |
151
+
| resourceId | Internal ID, which contains Azure subscription ID and namespace name |
152
+
| operationName | Name of the operation that's done during the group coordination |
153
+
| clientId | Client ID |
154
+
| namespaceName | Namespace name |
155
+
| subscriptionId | Azure subscription ID |
156
+
| message | Informational message, which provides details about actions done during the consumer group coordination. |
157
+
158
+
## Kafka user error logs schema
159
+
Kafka user error log JSON includes elements listed in the following table:
160
+
161
+
| Name | Description |
162
+
| ---- | ----------- |
163
+
| trackingId | tracking ID, which is used for tracing purposes. |
164
+
| namespaceName | Namespace name |
165
+
| eventhub | Event hub name |
166
+
| partitionId | Partition ID |
167
+
| groupId | Group ID |
168
+
| ClientId | Client ID |
169
+
| resourceId | Internal ID, which contains Azure subscription ID and namespace name |
170
+
| message | Informational message, which provides details about an error |
Event Hubs virtual network (VNet) connection event JSON includes elements listed in the following table:
175
+
176
+
| Name | Description |
177
+
| --- | ----------- |
178
+
| subscriptionId | Azure subscription ID |
179
+
| namespaceName | Namespace name |
180
+
| ipAddress | IP address of a client connecting to the Event Hubs service |
181
+
| action | Action done by the Event Hubs service when evaluating connection requests. Supported actions are **AcceptConnection** and **RejectConnection**. |
182
+
| reason | Provides a reason why the action was done |
183
+
| count | Number of occurrences for the given action |
184
+
| resourceId | Internal resource ID, which contains subscription ID and namespace name. |
185
+
186
+
## Customer-managed key user logs
187
+
Customer-managed key user log JSON includes elements listed in the following table:
188
+
189
+
| Name | Description |
190
+
| ---- | ----------- |
191
+
| category | Type of category for a message. It's one of the following values: **error** and **info**|
192
+
| resourceId | Internal resource ID, which includes Azure subscription ID and namespace name |
193
+
| keyVault | Name of the Key Vault resource |
194
+
| key | Name of the Key Vault key. |
195
+
| version | Version of the Key Vault key |
196
+
| operation | The name of an operation done to serve requests |
197
+
| code | Status code |
198
+
| message | Message, which provides details about an error or informational message |
199
+
200
+
201
+
137
202
## Next steps
138
203
-[Introduction to Event Hubs](event-hubs-what-is-event-hubs.md)
139
204
-[Event Hubs API overview](event-hubs-api-overview.md)
0 commit comments