Error setting auto scale using custom metric

minetree 1 Reputation point
2022-09-07T12:04:03.57+00:00

Hello.

An error occurred when I tried to set up auto scale using custom metrics with the following settings.

   {  
       "location": "Japan East",  
       "tags": {},  
       "properties": {  
           "name": "hogehoge",  
           "enabled": true,  
           "targetResourceUri": "hogehoge",  
           "profiles": [  
               {  
                   "name": "hogehoge",  
                   "capacity": {  
                       "minimum": "1",  
                       "maximum": "3",  
                       "default": "1"  
                   },  
                   "rules": [  
                       {  
                           "scaleAction": {  
                               "direction": "Increase",  
                               "type": "ChangeCount",  
                               "value": "1",  
                               "cooldown": "PT5M"  
                           },  
                           "metricTrigger": {  
                               "metricName": "metrics_un_d",  
                               "metricNamespace": "metrics_un_d",  
                               "metricResourceUri": "hogehoge",  
                               "operator": "GreaterThan",  
                               "statistic": "Average",  
                               "threshold": 1,  
                               "timeAggregation": "Minimum",  
                               "timeGrain": "PT1M",  
                               "timeWindow": "PT10M",  
                               "Dimensions": [],  
                               "dividePerInstance": false  
                           }  
                       }  
                   ]  
               }  
           ],  
           "notifications": [],  
           "targetResourceLocation": "Japan East"  
       },  
       "id": "hogehoge",  
       "name": "hogehoge",  
       "type": "Microsoft.Insights/autoscaleSettings"  
   }  

The error is as follows.

   {"code": "UnsupportedMetric", "message": "Exception of type 'Microsoft.WindowsAzure.Management.Monitoring.MonitoringServiceException' was MonitoringServiceException' was thrown."}  

The custom metric used is the value sent by the Rest API (python) from the App Service (flask) built on the Azure server.

Is it possible to tell us why an error occurs when we set up auto scale using the custom metric?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,779 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,788 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 25,471 Reputation points Microsoft Employee
    2022-09-11T20:46:47.1+00:00

    Your app service is a function app on the consumption plan. Autoscale for app service plans are only supported for SKUs Standard and above. By default, the Azure Function Consumption plan will scale automatically in periods of high load, there's no need for an auto scale rule.

    1 person found this answer helpful.
    0 comments No comments