exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 5 question 11 discussion

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

HOTSPOT -
You are debugging an application that is running on Azure Kubernetes cluster named cluster1. The cluster uses Azure Monitor for containers to monitor the cluster.
The application has sticky sessions enabled on the ingress controller.
Some customers report a large number of errors in the application over the last 24 hours.
You need to determine on which virtual machines (VMs) the errors are occurring.
How should you complete the Azure Monitor query? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: ago(1d)

Box 2: distinct containerID -
Box 3: where ContainerID in (ContainerIDs)
Box 4: summarize Count by Computer
Summarize: aggregate groups of rows
Use summarize to identify groups of records, according to one or more columns, and apply aggregations to them. The most common use of summarize is count, which returns the number of results in each group.
Reference:
https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/get-started-queries https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/query-optimization

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
Marusyk
Highly Voted 3 years, 1 month ago
the answer is correct
upvoted 42 times
ReyPirata
8 months, 1 week ago
On my exam 2023-08-20. Scored 925 ago(1) distinct ContainerID where ContainerID in (ContainerIDs) summarize count() by Computer
upvoted 7 times
...
...
pac1311
Highly Voted 3 years, 3 months ago
Isn't kubernetes out of scope for AZ-204?
upvoted 13 times
gmishra88
1 year, 6 months ago
There are many questions from kubernetes
upvoted 2 times
...
phuria
3 years, 2 months ago
You'll notice it really isn't about kubernetes per say, but how to query your logs from Log Analytics
upvoted 16 times
surprise0011
1 year ago
yep, it is more about monitoring
upvoted 1 times
...
...
Chilred
3 years, 3 months ago
No, i think there are still some question from az203
upvoted 3 times
...
[Removed]
8 months ago
I guess if kubernetes is not the only product involved in the question then the question still appears
upvoted 1 times
...
...
WH16
Most Recent 8 months, 3 weeks ago
Kubernetes out if scope as of August 2023
upvoted 3 times
macobuzi
8 months ago
Better safe than sorry!
upvoted 4 times
...
...
rockstar89
8 months, 4 weeks ago
Got it exam 31/07/2023
upvoted 6 times
...
juanckar
9 months, 3 weeks ago
This was on the exam (July 2023). Went with proposed. Scored 917
upvoted 7 times
...
uffuchsi
1 year, 2 months ago
The question asks for errors in last 24 hours, so startTimestap should be 'ago (1d)'. We need to distinct the logs for each container from set of containers. So, distinct based on ContainerID and where condition on container Ids. We need to determine the VM. So, summarize count() by computer. https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/get-started-queries https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/query-optimization
upvoted 2 times
...
Aterniss
1 year, 4 months ago
Got this 15/12/2022
upvoted 5 times
surprise0011
1 year ago
thanks for mentioning. Maybe Kubernetes is out of scope but this question is more about monitoring
upvoted 1 times
...
...
elequiel
1 year, 6 months ago
Got it in exam 20/10/2022
upvoted 5 times
...
Knightie
1 year, 8 months ago
the VMs here mean Containers.... sigh....
upvoted 1 times
...
petitbilly
2 years, 1 month ago
Got it in exam 03/22
upvoted 3 times
...
oescm
2 years, 2 months ago
Got this one 02/2022, so this question is NOT out of scope. I went with the provided answer
upvoted 7 times
...
lugospod
2 years, 3 months ago
Got this one 01/2022. Went with most voted (to avoid writing answers again)
upvoted 9 times
MasterQuestMaster
2 years, 3 months ago
I got this as well.
upvoted 3 times
...
...
glam
2 years, 11 months ago
correct
upvoted 4 times
...
diligent176
3 years, 3 months ago
ago(1d) is correct. date(now()-1d) is not correct syntax (query won't run or compile at all).
upvoted 7 times
HimanshuNankani
2 years, 6 months ago
Should have told the correct syntax as well.
upvoted 1 times
...
...
m_siri
3 years, 4 months ago
I think the answer to the 1st drop should be; let start Timestamp = date(now() - 1d) because we need to take the logs occured within the last 24 hours, not for the previous day
upvoted 4 times
adilkhan
1 year, 3 months ago
no ago is correct..!
upvoted 1 times
...
stylebc
3 years, 4 months ago
You are not right, correct is ago(1d), as from ago function description: https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/agofunction a_timespan - Interval to subtract from the current UTC clock time (now()).
upvoted 19 times
...
ALittleBunny
3 years, 4 months ago
Wrong. It should be ago(1d) as ago(a_timespan) subtracts the given timespan from the current UTC clock time. https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/examples#search-application-level-events-described-as-cryptographic
upvoted 6 times
...
mitcheld
3 years, 4 months ago
I think it should be ago. Search for "Summarize: aggregate groups of rows" at https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/get-started-queries
upvoted 1 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