0
0
Azurecloud~10 mins

Azure Monitor overview - Interactive Code Practice

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

Complete the code to create an Azure Monitor Log Analytics workspace.

Azure
az monitor log-analytics workspace create --resource-group myResourceGroup --workspace-name [1]
Drag options to blanks, or click blank then click option'
AmyStorageAccount
BmyVM
CmyWorkspace
DmyResourceGroup
Attempts:
3 left
💡 Hint
Common Mistakes
Using the resource group name instead of the workspace name.
Using unrelated resource names like VM or storage account.
2fill in blank
medium

Complete the code to enable Azure Monitor metrics for a virtual machine.

Azure
az monitor metrics alert create --name HighCPUAlert --resource-group myResourceGroup --scopes [1] --condition "avg Percentage CPU > 80" --window-size 5m --evaluation-frequency 1m
Drag options to blanks, or click blank then click option'
A/subscriptions/xxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorage
B/subscriptions/xxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM
CmyVM
DmyResourceGroup
Attempts:
3 left
💡 Hint
Common Mistakes
Using only the VM name instead of the full resource ID.
Using the resource group name as the scope.
3fill in blank
hard

Fix the error in the command to create an alert rule for CPU usage.

Azure
az monitor metrics alert create --name CPUAlert --resource-group myResourceGroup --scopes [1] --condition "avg Percentage CPU > 90" --window-size 5m --evaluation-frequency 1m
Drag options to blanks, or click blank then click option'
A/subscriptions/xxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNIC
BmyVM
CmyResourceGroup
D/subscriptions/xxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM
Attempts:
3 left
💡 Hint
Common Mistakes
Using only the VM name as scope.
Using a network interface resource ID instead of the VM.
4fill in blank
hard

Fill both blanks to create a query that returns CPU usage over the last hour.

Azure
Perf | where TimeGenerated > ago([1]) | where CounterName == [2]
Drag options to blanks, or click blank then click option'
A1h
B"\Processor(_Total)\% Processor Time"
C1d
D"\Memory\Available MBytes"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 1 day instead of 1 hour for the time filter.
Using memory counters instead of CPU counters.
5fill in blank
hard

Fill all three blanks to create an alert rule that triggers when disk space is low.

Azure
az monitor metrics alert create --name DiskSpaceAlert --resource-group myResourceGroup --scopes [1] --condition "avg [2] [3] 10" --window-size 10m --evaluation-frequency 5m
Drag options to blanks, or click blank then click option'
A/subscriptions/xxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM
B"LogicalDisk % Free Space"
C<
D"LogicalDisk Free Space"
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect metric names.
Using > instead of < for the condition.
Using resource group name instead of full resource ID.