It looks like you're having trouble with the Azure CLI not recognizing guest OS metrics when creating an autoscale rule for a VMSS. The issue might be due to the formatting of the metric name in the command.
In your command, you're using: 'azure.vm.linux.guestmetrics mem/available_percent > 75 avg 10m'
Instead, you should try using the metric namespace and metric name separately like this:
--metric-namespace 'azure.vm.linux.guestmetrics' --metric-name 'mem/available_percent'
So, your full command would look like:
cssCopy code
az monitor autoscale rule create --resource-group ls1-cpabs-11583-rg --autoscale-name ls1-cpabs-11583-router-scaleset-001 --metric-namespace 'azure.vm.linux.guestmetrics' --metric-name 'mem/available_percent' --operator '>' --threshold 75 --aggregation 'Average' --window-size '10m' --scale out 1
Give this a try and see if it resolves the issue. If you still face problems, consider checking the Azure CLI version and updating it if needed. Good luck!