azureazure-rmazure-rest-apiazazure-service-plan

How to retrieve App Service Plan instance name (RDXXXXX)?


I am having an issue trying to retrieve all the instance names in an Azure App Service Plan.

In Azure Monitor, if you specify a "Scope" to "App Service Plan" and look at the Metric "CPU Percentage" and then add a filter to specify the "Instance" property, you can see which instance uses the most CPU. I am trying to do a PowerShell script to get these values. Unfortunatly I have not found any Azure REST Api that would give me this information so that my script would be 100% dynamic. I looked at the AzureRm or Az PowerShell modules but did not find anything there.

Any ideas how I can retrieve this list? The instances names looks like this :RD123456.

Thanks for you help !


Solution

  • Suppose you want to get the web instance name, if that's right you could get it from instance process with Web Apps - Get Instance Process.

    And under the environment_variables there is a COMPUTERNAME suppose this is what you want.

    enter image description here