Complete the code to create an Azure Monitor alert rule for operational excellence.
az monitor metrics alert create --name 'HighCPUAlert' --resource-group 'MyResourceGroup' --scopes [1] --condition "avg Percentage CPU > 80" --description 'Alert when CPU usage is high'
The --scopes parameter requires the full resource ID of the resource to monitor, such as a virtual machine.
Complete the code to enable Azure Advisor recommendations for operational excellence.
az advisor configuration update --resource-group [1] --enable trueThe --resource-group parameter specifies the resource group where the Advisor configuration is applied.
Fix the error in the Azure CLI command to export operational logs to a storage account.
az monitor diagnostic-settings create --name 'OpLogs' --resource [1] --storage-account 'mystorageaccount' --logs '[{"category": "Administrative", "enabled": true}]'
The --resource parameter requires the full resource ID of the resource to export logs from.
Fill both blanks to configure an Azure Policy assignment for operational excellence.
az policy assignment create --name 'EnforceTag' --policy [1] --scope [2]
The --policy parameter requires the full policy definition ID, and --scope is the resource group where the policy is assigned.
Fill all three blanks to create an Azure Automation runbook for operational excellence.
az automation runbook create --resource-group [1] --automation-account-name [2] --name [3] --type PowerShell
The --resource-group is where the automation account exists, --automation-account-name is the name of that account, and --name is the runbook's name.