|
| 1 | +--- |
| 2 | +title: Azure Event Grid - Enable diagnostic logs for a topic |
| 3 | +description: This article provides step-by-step instructions on how to enable diagnostic logs for an Azure event grid topic. |
| 4 | +services: event-grid |
| 5 | +author: spelluru |
| 6 | + |
| 7 | +ms.service: event-grid |
| 8 | +ms.topic: how-to |
| 9 | +ms.date: 01/30/2020 |
| 10 | +ms.author: spelluru |
| 11 | +--- |
| 12 | + |
| 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. |
| 15 | + |
| 16 | +## Prerequisites |
| 17 | + |
| 18 | +- A provisioned event grid topic |
| 19 | +- A provisioned destination for capturing diagnostic logs. It can one of the following destinations: |
| 20 | + - Azure storage account |
| 21 | + - Event hub |
| 22 | + - Log Analytics workspace |
| 23 | + |
| 24 | + |
| 25 | +## Steps for enabling diagnostic logs for a topic |
| 26 | + |
| 27 | +1. Sign in to the [Azure portal](https://portal.azure.com). |
| 28 | +2. Navigate to the event grid topic for which you want to enable diagnostic log settings. |
| 29 | +3. Select **Diagnostic settings** under **Monitoring** in the left menu. |
| 30 | +4. On the **Diagnostic settings** page, select **Add New Diagnostic Setting**. |
| 31 | + |
| 32 | +  |
| 33 | +5. Specify a **name** for the diagnostic setting. |
| 34 | + |
| 35 | +  |
| 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 | + - If you select **Archive to a storage account**, select **Storage account - Configure**, and then select the storage account in your Azure subscription. |
| 38 | + |
| 39 | +  |
| 40 | + - If you select **Stream to an event hub**, select **Event hub - Configure**, and then select the Event Hubs namespace, event hub, and the access policy. |
| 41 | +  |
| 42 | + - If you select **Send to Log Analytics**, select the Log Analytics workspace. |
| 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. |
| 47 | +9. Now, back on the **Diagnostic settings** page, confirm that you see a new entry in the **Diagnostics Settings** table. |
| 48 | +  |
| 49 | + |
| 50 | + You can also enable collection of all metrics for the topic. |
| 51 | + |
| 52 | +## 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/). |
0 commit comments