0
0
Azurecloud~10 mins

Metrics for resource performance in Azure - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to retrieve CPU usage metric for an Azure VM.

Azure
az monitor metrics list --resource [1] --metric "Percentage CPU"
Drag options to blanks, or click blank then click option'
AmyResourceGroup/myVM
B/subscriptions/123/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM
CmyVM
DresourceGroup/myVM
Attempts:
3 left
💡 Hint
Common Mistakes
Using only the VM name without full resource path
Using resource group and VM name separated by slash without full path
2fill in blank
medium

Complete the code to filter metrics by time range in Azure CLI.

Azure
az monitor metrics list --resource [1] --metric "Network In" --interval PT1H
Drag options to blanks, or click blank then click option'
A/subscriptions/abc/resourceGroups/rg1/providers/Microsoft.Sql/servers/sql1
B/subscriptions/abc/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1
C/subscriptions/abc/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/sa1
D/subscriptions/abc/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1
Attempts:
3 left
💡 Hint
Common Mistakes
Using VM or storage account resource IDs for network metrics
Not specifying the correct resource type for the metric
3fill in blank
hard

Fix the error in the Azure CLI command to list metrics for a storage account.

Azure
az monitor metrics list --resource [1] --metric Transactions
Drag options to blanks, or click blank then click option'
A/subscriptions/xyz/resourceGroups/rg2/providers/Microsoft.Storage/storageAccounts/myStorage
B/subscriptions/xyz/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/myVM
C/subscriptions/xyz/resourceGroups/rg2/providers/Microsoft.Network/networkInterfaces/myNIC
D/subscriptions/xyz/resourceGroups/rg2/providers/Microsoft.Sql/servers/mySqlServer
Attempts:
3 left
💡 Hint
Common Mistakes
Using VM or network interface resource IDs for storage metrics
Using SQL server resource ID for storage metrics
4fill in blank
hard

Fill both blanks to create a query that lists CPU and Memory metrics for a VM in the last 30 minutes.

Azure
az monitor metrics list --resource [1] --metric [2] --interval PT30M
Drag options to blanks, or click blank then click option'
A/subscriptions/1234/resourceGroups/rgVM/providers/Microsoft.Compute/virtualMachines/vm01
BDiskReadBytes
CPercentage CPU Available Memory Bytes
DPercentage CPU Network In
Attempts:
3 left
💡 Hint
Common Mistakes
Using incomplete resource IDs
Using incorrect metric names or unrelated metrics
5fill in blank
hard

Fill all three blanks to create a command that retrieves average Disk Write Bytes metric for a VM over the last hour with aggregation.

Azure
az monitor metrics list --resource [1] --metric [2] --aggregation [3] --interval PT1H
Drag options to blanks, or click blank then click option'
A/subscriptions/5678/resourceGroups/rgDisk/providers/Microsoft.Compute/virtualMachines/vmDisk01
BDisk Write Bytes
CAverage
DTotal
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect metric names
Using aggregation types not supported or unrelated to the metric