Skip to main content

Azure API Management

Thumbnail icon

Azure API Management is a hybrid multicloud management platform for APIs across all environments. As a platform-as-a-service, API Management supports the complete API lifecycle. This integration provides near real-time visibility into the state and health of your APIs with rich information about API Management operations that are important for auditing.

Log and Metric types

For Azure API Management, you can collect the following logs and metrics:

  • Resource logs. To know more about the resource log schema for Azure API Management, refer to the Azure documentation. The Consumption tier doesn't support the collection of resource logs.
  • Platform Metrics for Azure API Management. These metrics are available in Microsoft.ApiManagement/service namespace.

Setup

Azure service sends monitoring data to Azure Monitor, which can then stream data to Eventhub. Sumo Logic supports:

You must explicitly enable diagnostic settings for each Azure API Management service you want to monitor. You can forward logs to the same event hub provided they satisfy the limitations and permissions as described here.

When you configure the event hubs source or HTTP source, plan your source category to ease the querying process. A hierarchical approach allows you to make use of wildcards. For example: Azure/APIManagement/Logs, Azure/APIManagement/Metrics.

Configure metrics collection

In this section, you will configure a pipeline for shipping metrics from Azure Monitor to an Event Hub, on to an Azure Function, and finally to an HTTP Source on a hosted collector in Sumo Logic.

  1. Configure an HTTP Source.
  2. Configure and deploy the ARM Template.
  3. Export metrics to Event Hub. Perform below steps for each Azure API Management service that you want to monitor.
    1. Choose Stream to an event hub as destination.
    2. Select AllMetrics.
    3. Use the Event hub namespace created by the ARM template in Step 2 above. You can create a new Event hub or use the one created by ARM template. You can use the default policy RootManageSharedAccessKey as the policy name.

Configure logs collection

In this section, you will configure a pipeline for shipping diagnostic logs from Azure Monitor to an Event Hub.

  1. To set up the Azure Event Hubs cloud-to-cloud source in Sumo Logic portal, refer to our Azure Event Hubs source documentation.
  2. To create the Diagnostic settings in Azure portal, refer to the Azure documentation. Perform below steps for each Azure API Management service that you want to monitor.
    1. Choose Stream to an event hub as the destination.
    2. Select allLogs.
    3. Use the Event hub namespace and Event hub name configured in previous step in destination details section. You can use the default policy RootManageSharedAccessKey as the policy name.
  3. By default, logging is enabled for all APIs, to modify the logging settings, refer to the Azure documentation.
  4. To log API Management events using log-to-eventhub policy, refer to the Azure documentation.

Troubleshooting

Azure Event Hubs Source

Common error types are described here.

You can try restarting the source for ThirdPartyConfig errors.

HTTP Logs and Metrics Source used by Azure Functions

To troubleshoot metrics collection, follow the instructions in Collect Metrics from Azure Monitor > Troubleshooting metrics collection.

Legal
Privacy Statement
Terms of Use

Copyright © 2023 by Sumo Logic, Inc.