Troubleshooting 400 Errors with Azure Metrics Exporter

SwathiDhanwada-MSFT 18,766 Reputation points
2024-08-01T06:59:11.6966667+00:00

Why am I receiving a 400 error when configuring the Azure Metrics Exporter to retrieve metrics such as ApplicationGatewayTotalTime?

PS - Based on common issues that we have seen from customers and other sources, we are posting these questions to help the Azure community.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,275 questions
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,070 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SwathiDhanwada-MSFT 18,766 Reputation points
    2024-08-01T06:59:48.48+00:00

    The 400 error occurs because the metric ApplicationGatewayTotalTime is not supported for the specific SKU of the resource being queried. Azure metrics are documented by individual Resource Providers, and not all metrics apply to all resource SKUs. To determine which metrics are available for a specific resource, you should use the Metric Definitions API call, which will return only the applicable metrics for the given resource ID.

    To resolve this issue, follow these steps:

    1. Use the Metric Definitions API to query the metrics available for your specific resource. This call will filter out any metrics that do not apply to the resource based on its SKU.
    2. Adjust your configuration to use only the metrics that are returned by the Metric Definitions API for the specific resource you are working with.

    For more detailed information, refer to the following Azure documentation:

    Please do not forget to "up-vote" wherever the information provided helps you, as this can be beneficial to other community members.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.