Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 2.56 KB

File metadata and controls

38 lines (27 loc) · 2.56 KB
author dlepow
ms.service azure-api-management
ms.topic include
ms.date 07/09/2025
ms.author danlep
ms.custom
build-2025

To configure a diagnostic setting for collection of resource logs:

  1. In the Azure portal, navigate to your API Management instance.

  2. In the left menu, under Monitoring, select Diagnostic settings > + Add diagnostic setting.

    :::image type="content" source="media/api-management-diagnostic-settings/monitoring-menu.png" alt-text="Screenshot of adding a diagnostic setting in the portal.":::

  3. On the Diagnostic setting page, enter or select details for the setting:

    1. Diagnostic setting name: Enter a descriptive name.
    2. Category groups: Optionally make a selection for your scenario.
    3. Under Categories: Select one or more categories. For example, select Logs related to ApiManagement Gateway to collect logs for most requests to the API Management gateway.
    4. Under Destination details, select one or more options and specify details for the destination. For example, send logs to an Azure Log Analytics workspace, archive logs to a storage account, or stream them to an event hub. For more information, see Diagnostic settings in Azure Monitor.
    5. Select Save.

    [!TIP]

    • To view API analytics in the Azure Monitor-based dashboard for API Management (Monitoring > Analytics blade), select an Azure Log Analytics workspace as the destination.
    • If you select a Log Analytics workspace, you can choose to store the data in a resource-specific table (for example, an ApiManagementGatewayLogs table) or store in the general AzureDiagnostics table. We recommend using the resource-specific table for log destinations that support it. Learn more
  4. After configuring details for the log destination or destinations, select Save.

Note

Adding a diagnostic setting object might result in a failure if the MinApiVersion property of your API Management service is set to any API version higher than 2022-09-01-preview.

Note

To enable diagnostic settings for API Management workspaces, see Create and manage a workspace.