exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 1 question 16 discussion

Actual exam question from Microsoft's AZ-204
Question #: 16
Topic #: 1
[All AZ-204 Questions]

HOTSPOT -
You have developed a Web App for your company. The Web App provides services and must run in multiple regions.
You want to be notified whenever the Web App uses more than 85 percent of the available CPU cores over a 5 minute period. Your solution must minimize costs.
Which command should you use? To answer, select the appropriate settings in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Reference:
https://docs.microsoft.com/sv-se/cli/azure/monitor/metrics/alert

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
2bruhornot2bruh
Highly Voted 5 months ago
For anyone wondering why it's --window-size and not --evaluation-frequency: you want the average across 5 minutes. With --evaluation-frequency you don't go for averages, you simply check what the given value is at specific intervals.
upvoted 44 times
...
CellCS
Highly Voted 2 years, 9 months ago
Correct, Eng reference is here https://docs.microsoft.com/en-us/cli/azure/monitor/metrics/alert?view=azure-cli-latest
upvoted 20 times
...
Sandy4912
Most Recent 3 months ago
Example Scenario: Suppose you want to create a metric alert for when the CPU usage of your Web App exceeds 85% over a 5-minute window, and you want Azure to check this every 1 minute. --window-size: 5 minutes (you want the CPU usage to exceed 85% for a full 5-minute period before triggering the alert). --evaluation-frequency: 1 minute (Azure will check the CPU usage every minute to see if the 5-minute period still holds).
upvoted 1 times
...
8a6a5d3
4 months, 4 weeks ago
Using AVG Percentage CPU ensures that your alert will be triggered when the average CPU usage over a 5-minute period exceeds 85%
upvoted 1 times
...
zreaf29
5 months ago
Window size is the period of time over which Azure Monitor will collect metrics for a metric alert rule. Evaluation frequency is the frequency with which Azure Monitor will evaluate the metric alert rule for violations. if you set the window size to 5 minutes and the evaluation frequency to 1 minute, Azure Monitor will collect metrics for the previous 5 minutes and then evaluate the metric alert rule for violations every minute. This means that if there is a violation in the 5 minute window, Azure Monitor will detect it within 1 minute. We want to get percent “over a 5 minute period”, we have to use window size parameter. Only use evaluation frequency parameter is not enough for getting question request.
upvoted 8 times
...
james2033
10 months ago
az monitor metrics alert create -n alert1 -g {ResourceGroup} --scopes {VirtualMachineID} --condition "avg Percentage CPU > 90" --window-size 5m --evaluation-frequency 1m --action "/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Insights/actionGroups/<actionGroupName>" apiKey={APIKey} type=HighCPU --description "High CPU" https://learn.microsoft.com/en-us/cli/azure/monitor/metrics/alert?view=azure-cli-latest#az-monitor-metrics-alert-create-examples
upvoted 1 times
...
yunqing
1 year, 4 months ago
Hello, may I know why Box 1 is 'avg Percentage CPU ', instead of 'Percentage CPU '. It wants to be notified whenever over than 85. Whenever, meaning the maximum, not the average?
upvoted 5 times
RDTAus
1 year, 3 months ago
I am with you on this one, I think it should be Percentage CPU instead https://learn.microsoft.com/en-us/cli/azure/vm/monitor/metrics?view=azure-cli-latest
upvoted 3 times
martin96
11 months ago
With the average over 5 minutes it would aggregate the cpu usage the last 5 min to provide an average and only alert if the average is over 85. Given that the question states "over a 5 min window" the Percentage CPU then if the CPU ever goes above 85 in a given 5 min window an alert would be sent. Say the CPU is around 50 and spikes for 1 tick to 86 then it would create an alert even though the average is 55.
upvoted 4 times
asdfdude
10 months, 2 weeks ago
"uses more than 85 percent of the available CPU cores over a 5 minute period." The wording is so bad. Its could mean any of over 85 for the entire 5 minutes, over 85 at any point during the 5 minute windows, or avg > 85. My interpretation is cpu >85% for the entire duration, but there's no way to fulfill that requirement so the closest is average.
upvoted 1 times
...
...
...
...
uffuchsi
2 years ago
1. avg Percentage CPU, 2. window size
upvoted 1 times
...
Topic9
2 years, 2 months ago
az monitor metrics alert create -n alert1 -g {ResourceGroup} --scopes {VirtualMachineID} \ --condition "avg Percentage CPU > 90" --window-size 5m --evaluation-frequency 1m \ --action "/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Insights/actionGroups/<actionGroupName>" apiKey={APIKey} type=HighCPU \ --description "High CPU"
upvoted 2 times
...
narenazure
2 years, 2 months ago
Box 2: --window-size Time over which to aggregate metrics in "##h##m##s" format. https://learn.microsoft.com/en-us/cli/azure/monitor/metrics/alert?view=azure-cli-latest
upvoted 1 times
...
POOOJAAAAAAAAAA
2 years, 2 months ago
Box 2: Window Size az monitor metrics alert create -n alert1 -g {ResourceGroup} --scopes {VirtualMachineID} \ --condition "avg Percentage CPU > 90" --window-size 5m --evaluation-frequency 1m \ --action "/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Insights/actionGroups/<actionGroupName>" apiKey={APIKey} type=HighCPU \ --description "High CPU"
upvoted 1 times
...
OPT_001122
2 years, 3 months ago
what is the correct value for box2?
upvoted 1 times
...
DiveyK
2 years, 5 months ago
--window-size : Time over which to aggregate metrics in "##h##m##s" format.
upvoted 3 times
...
RachidBinAhmed
2 years, 5 months ago
the param --window size has a typo, missing a dash?
upvoted 1 times
...
srinz
2 years, 5 months ago
Given answer is correct https://learn.microsoft.com/en-us/cli/azure/monitor/metrics/alert?view=azure-cli-latest#az-monitor-metrics-alert-create az monitor metrics alert create -n alert1 -g {ResourceGroup} --scopes {VirtualMachineID} \ --condition "avg Percentage CPU > 90" --window-size 5m --evaluation-frequency 1m \ --action "/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Insights/actionGroups/<actionGroupName>" apiKey={APIKey} type=HighCPU \ --description "High CPU"
upvoted 2 times
...
kampatra
2 years, 5 months ago
Box 1: avg Percentage CPU > 85 Box 2: --evaluation-frequency 5m
upvoted 6 times
JohnSmith93
2 years, 4 months ago
I would also think this is the solution because it reduces the times the query needs to be run, which is related to one to the criteria's in the question: "Your solution must minimize costs."
upvoted 1 times
...
OPT_001122
2 years, 3 months ago
why evaluation-frequency 5m, still not clear
upvoted 3 times
...
...
vadimprokopchuk
2 years, 5 months ago
Box 1: avg Percentage CPU > 85 Box 2: --evaluation-frequency 5m
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago