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-grid/enable-diagnostic-logs-topic.md
+39-9Lines changed: 39 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,17 @@ author: spelluru
6
6
7
7
ms.service: event-grid
8
8
ms.topic: how-to
9
-
ms.date: 01/30/2020
9
+
ms.date: 04/27/2020
10
10
ms.author: spelluru
11
11
---
12
12
13
13
# Diagnostic logs for an Azure event grid topic
14
-
Diagnostic settings allow Event Grid users to capture and view publish and delivery failure Logs in one of the following places: an Azure storage account, an event hub, or a Log Analytics workspace. This article provides step-by-step instructions to enable diagnostic logs for an event grid topic.
14
+
Diagnostic Settings now allows Event Grid users to capture and view **publish and delivery failure** Logs in either a Storage account, an event hub or a Log Analytics Workspace. This article provides step-by-step instructions to enable these settings on an Event Grid Topic.
15
15
16
16
## Prerequisites
17
17
18
18
- A provisioned event grid topic
19
-
- A provisioned destination for capturing diagnostic logs. It can one of the following destinations:
19
+
- A provisioned destination for capturing diagnostic logs. It can one of the following destinations in the same location as the Event Grid topic:
20
20
- Azure storage account
21
21
- Event hub
22
22
- Log Analytics workspace
@@ -31,8 +31,8 @@ Diagnostic settings allow Event Grid users to capture and view publish and deliv
7. Select the **DeliveryFailures** and **PublishFailures** options in the **Log** section.
35
+

36
36
6. Enable one or more of the capture destinations for the logs, and then configure them by selecting a previous created capture resource.
37
37
- If you select **Archive to a storage account**, select **Storage account - Configure**, and then select the storage account in your Azure subscription.
38
38
@@ -41,13 +41,43 @@ Diagnostic settings allow Event Grid users to capture and view publish and deliv
41
41

42
42
- If you select **Send to Log Analytics**, select the Log Analytics workspace.
43
43

44
-
7. Select the **DeliveryFailures** and **PublishFailures** options in the **Log** section.
45
-

46
-
8. Select **Save**. Select **X** in the right-corner to close the page.
44
+
8. Select **Save**. Then, select **X** in the right-corner to close the page.
47
45
9. Now, back on the **Diagnostic settings** page, confirm that you see a new entry in the **Diagnostics Settings** table.
48
46

49
47
50
48
You can also enable collection of all metrics for the topic.
51
49
50
+
## View diagnostic logs in Azure Storage
51
+
52
+
1. Once you enable a storage account as a capture destination and Event Grid starts emitting diagnostic logs, you should see new containers named **insights-logs-deliveryfailures** and **insights-logs-publishfailures** in the storage account.
53
+
54
+

55
+
2. As you navigate through one of the containers, you will end up at a blob in JSON format. The file contains a log entries for either a delivery failure or a publish failure. The navigation path represents the **ResourceId** of the Event Grid topic and the timestamp (minute level) as to when the log entries were emitted. The blob/JSON file, which is downloadable, in the end adheres to the schema described in the next section.
56
+
57
+

58
+
3. You should see content in the JSON file similar to the following example:
| Time | DateTime | Time when the log entry was generated <p>**Example value:** 01-29-2020 09:52:02.700</p> |
76
+
| EventSubscriptionName | String | Name of the event subscription <p>**Example value:** "EVENTSUB1"</p> <p>This property exists only for delivery failure logs.</p> |
| OperationName | String | Name of the operation performed while encountering the failure.<p>**Example Values:** "Deliver" for delivery failures. |
79
+
| Message | String | Log message for the user explaining the reason for the failure and other additional details. |
80
+
| ResourceId | String | ResourceId for the topic/domain resource<p>**Example Values:** `/SUBSCRIPTIONS/SAMPLE-SUBSCRIPTION-ID/RESOURCEGROUPS/SAMPLE-RESOURCEGROUP/PROVIDERS/MICROSOFT.EVENTGRID/TOPICS/TOPIC1` |
81
+
52
82
## Next steps
53
-
If you need more help, post your issue in the [Stack Overflow forum](https://stackoverflow.com/questions/tagged/azure-eventgrid) or open a [support ticket](https://azure.microsoft.com/support/options/).
83
+
See the following article: [Create diagnostic setting to collect resource logs and metrics in Azure](../azure-monitor/platform/diagnostic-settings.md)
0 commit comments