Skip to content

Commit fd16ea7

Browse files
authored
Merge pull request #113024 from spelluru/ehubdiag0428
added schemas for other types of logs
2 parents 4dd419b + 7001dd2 commit fd16ea7

File tree

4 files changed

+92
-27
lines changed

4 files changed

+92
-27
lines changed

articles/event-hubs/event-hubs-diagnostic-logs.md

Lines changed: 92 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,55 +15,54 @@ ms.topic: article
1515
ms.tgt_pltfrm: na
1616
ms.workload: data-services
1717
ms.custom: seodec18
18-
ms.date: 12/06/2018
18+
ms.date: 04/28/2020
1919
ms.author: shvija
2020

2121
---
2222
# Set up diagnostic logs for an Azure event hub
2323

2424
You can view two types of logs for Azure Event Hubs:
2525

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+
![Activity log for an Event Hubs namespace](./media/event-hubs-diagnostic-logs/activity-log.png)
2729
* **[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.
2830

29-
## Enable diagnostic logs
31+
The following section shows you how to enable diagnostic logs for an Event Hubs namespace.
3032

33+
## Enable diagnostic logs
3134
Diagnostic logs are disabled by default. To enable diagnostic logs, follow these steps:
3235

33-
1. In the [Azure portal](https://portal.azure.com), under **Monitoring + Management**, click **Diagnostics logs**.
34-
35-
![Pane navigation to diagnostic logs](./media/event-hubs-diagnostic-logs/image1.png)
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**.
4038

41-
![Turn on diagnostic logs](./media/event-hubs-diagnostic-logs/image2.png)
39+
![Diagnostic settings page - add diagnostic setting](./media/event-hubs-diagnostic-logs/diagnostic-settings-page.png)
40+
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.
4242

43-
4. For **Status**, click **On**.
43+
![Add diagnostic settings page](./media/event-hubs-diagnostic-logs/aDD-diagnostic-settings-page.png)
44+
6. Select **Save** on the toolbar to save the diagnostics settings.
4445

45-
![Change the status of diagnostic logs](./media/event-hubs-diagnostic-logs/image3.png)
46+
New settings take effect in about 10 minutes. After that, logs appear in the configured archival target, in the **Diagnostics logs** pane.
4647

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).
5449

5550
## Diagnostic logs categories
5651

57-
Event Hubs captures diagnostic logs for two categories:
52+
Event Hubs captures diagnostic logs for the following categories:
5853

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.
6161

62-
## Diagnostic logs schema
6362

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.
6564

66-
### Archive logs schema
65+
## Archive logs schema
6766

6867
Archive log JSON strings include elements listed in the following table:
6968

@@ -101,7 +100,7 @@ The following code is an example of an archive log JSON string:
101100
}
102101
```
103102

104-
### Operational logs schema
103+
## Operational logs schema
105104

106105
Operational log JSON strings include elements listed in the following table:
107106

@@ -134,6 +133,72 @@ Example:
134133
}
135134
```
136135

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 |
171+
172+
## Event Hubs virtual network connection event schema
173+
174+
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+
137202
## Next steps
138203
- [Introduction to Event Hubs](event-hubs-what-is-event-hubs.md)
139204
- [Event Hubs API overview](event-hubs-api-overview.md)
66.9 KB
Loading
54.1 KB
Loading
77.1 KB
Loading

0 commit comments

Comments
 (0)