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?