01 Run account list command (Windows/macOS/Linux) using custom query filters to list the IDs of the subscriptions available in your Azure account:
az account list
--query '[*].id'
02 The command output should return the requested subscription identifiers:
[
"abcdabcd-1234-abcd-1234-abcdabcdabcd",
"abcd1234-abcd-1234-abcd-abcd1234abcd",
]
03 Run vmss list command (Windows/macOS/Linux) using custom query filters to list the ID and the associated resource group of each virtual machine scale set provisioned in the selected Azure subscription:
az vmss list
--subscription abcdabcd-1234-abcd-1234-abcdabcdabcd
--query '[*].{id:id, resourceGroup:resourceGroup}'
04 The command output should return the requested virtual machine scale set identifiers:
[
{
"id": "/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/resourceGroups/cloud-shell-storage-westeurope/providers/Microsoft.Compute/virtualMachineScaleSets/cc-project5-scale-set",
"resourceGroup": "cloud-shell-storage-westeurope"
},
{
"id": "/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/resourceGroups/cloud-shell-storage-westeurope/providers/Microsoft.Compute/virtualMachineScaleSets/cc-web-front-scale-set",
"resourceGroup": "cloud-shell-storage-westeurope"
}
]
05 Run monitor autoscale list command (Windows/macOS/Linux) to list the ID of each autoscale configuration and its associated virtual machine scale set, available in the selected Azure resource group:
az monitor autoscale list
--resource-group cloud-shell-storage-westeurope
--query '[*].{targetId:targetResourceUri, id:id}'
06 The command output should return the requested identifiers. id represents the ID of the autoscale configuration and targetId represents the ID of the VM scale set associated with the autoscale configuration:
[
{
"id": "/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/resourceGroups/cloud-shell-storage-westeurope/providers/microsoft.insights/autoscalesettings/cc-project5-scale-set-Autoscale-30",
"targetId": "/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/resourceGroups/cloud-shell-storage-westeurope/providers/Microsoft.Compute/virtualMachineScaleSets/cc-project5-scale-set"
},
{
"id": "/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/resourceGroups/cloud-shell-storage-westeurope/providers/microsoft.insights/autoscalesettings/cc-web-front-scale-set-Autoscale-55",
"targetId": "/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/resourceGroups/cloud-shell-storage-westeurope/providers/Microsoft.Compute/virtualMachineScaleSets/cc-web-front-scale-set"
}
]
07 Run monitor autoscale show command (Windows/macOS/Linux) using the ID of the autoscale configuration associated with the VM scale set that you want to examine as identifier parameter, to describe the autoscale notification configuration available for the selected scale set:
az monitor autoscale show
--ids /subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/resourceGroups/cloud-shell-storage-westeurope/providers/microsoft.insights/autoscalesettings/cc-project5-scale-set-Autoscale-30
--query '{enabled:enabled, notifications:notifications}'
08 The command output should return the autoscale notification configuration object:
{
"enabled": false,
"notifications": [
{
"email": {
"customEmails": [],
"sendToSubscriptionAdministrator": false,
"sendToSubscriptionCoAdministrators": false
},
"webhooks": []
}
]
}
If
monitor autoscale show command output returns
enabled is false or an empty array, i.e. [], the selected virtual machine scale set is not using autoscaling. If the command output returns
enabled is true and a configuration object but there are no email administrator addresses or webhooks configured as recipients for alert notifications, as shown in the output example above, autoscale notifications are not enabled for the selected Microsoft Azure virtual machine scale set.
09 Repeat step no. 7 and 8 for each Azure virtual machine scale set deployed in the selected subscription.
10 Repeat steps no. 3 – 9 for each subscription created in your Microsoft Azure cloud account.