Share via

Is there any API to get the type of Azure web app?

cloudteam 80 Reputation points
2023-06-15T06:32:52.84+00:00

Hi,

I am trying to monitor Azure web apps using Azure metrics API. But for JAVA web apps some metrics like private bytes are not supported and when trying to fetch metrics in bulk, the non-supported metrics throw errors like mentioned below:

 {"code":"BadRequest","message":"Failed to find metric configuration for provider: Microsoft.Web, resource Type: sites, metric: PrivateBytes"}

Is there any way to avoid these types of errors dynamically via any API before sending a request to azure metrics API? I can know the type of the web app only at the run time.

Azure Monitor
Azure Monitor

An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Stanislav Zhelyazkov 29,401 Reputation points MVP Volunteer Moderator
    2023-06-15T07:40:06.65+00:00

    Hi,

    The easiest way would be probably to get the available metrics for the resource first via this API

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


Your answer

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