Complete the code to set the minimum number of instances for auto scaling.
az monitor autoscale create --resource-group MyResourceGroup --resource MyAppServicePlan --resource-type Microsoft.Web/serverfarms --min-count [1] --max-count 5 --count 1
The --min-count parameter sets the minimum number of instances. Setting it to 1 ensures at least one instance is always running.
Complete the code to add a scale rule based on CPU percentage.
az monitor autoscale rule create --resource-group MyResourceGroup --autoscale-name MyScaleRule --metric-name [1] --operator GreaterThan --threshold 70 --scale out 1 --cooldown 5
The CpuPercentage metric is commonly used to trigger scaling when CPU usage is high.
Fix the error in the scale rule command to correctly specify the scale direction.
az monitor autoscale rule create --resource-group MyResourceGroup --autoscale-name MyScaleRule --metric-name CpuPercentage --operator GreaterThan --threshold 80 --scale [1] 2 --cooldown 10
The correct scale direction keyword is out to increase instances.
Fill both blanks to create a scale rule that decreases instances when CPU is low.
az monitor autoscale rule create --resource-group MyResourceGroup --autoscale-name MyScaleRule --metric-name [1] --operator LessThan --threshold 30 --scale [2] 1 --cooldown 5
Use CpuPercentage for the metric and in to scale in (reduce instances) when CPU is low.
Fill all three blanks to create an autoscale profile with min, max, and default instance counts.
az monitor autoscale create --resource-group MyResourceGroup --resource MyAppServicePlan --resource-type Microsoft.Web/serverfarms --min-count [1] --max-count [2] --count [3]
Set minimum instances to 1, maximum to 5, and default count to 2 for balanced scaling.