Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam AZ-204 topic 16 question 2 discussion

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

You need to investigate the http server log output to resolve the issue with the ContentUploadService.
Which command should you use first?

  • A. az webapp log
  • B. az ams live-output
  • C. az monitor activity-log
  • D. az container attach
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
Scenario: Users of the ContentUploadService report that they occasionally see HTTP 502 responses on specific pages.
"502 bad gateway" and "503 service unavailable" are common errors in your app hosted in Azure App Service.
Microsoft Azure publicizes each time there is a service interruption or performance degradation.
The az monitor activity-log command manages activity logs.
Note: Troubleshooting can be divided into three distinct tasks, in sequential order:
1. Observe and monitor application behavior
2. Collect data
3. Mitigate the issue
Reference:
https://docs.microsoft.com/en-us/cli/azure/monitor/activity-log

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Whirly
Highly Voted 2 years, 11 months ago
Answer is az container attach Ref: https://docs.microsoft.com/en-us/azure/container-instances/container-instances-get-logs
upvoted 56 times
maukaba
2 years, 4 months ago
C it's correct see link https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-http-502-http-503
upvoted 2 times
...
Zidimirite
2 years, 11 months ago
It's not deployed to a container. This is a regular webapp so A, az webapp log is the correct answer.
upvoted 3 times
clarionprogrammer
2 years, 11 months ago
It is. Note the type in the ContentUploadService log.
upvoted 1 times
...
ning
2 years, 7 months ago
az container attach only gives STDOUT and STDERR, not web server log ... web server log can have option to see STDOUT / STDERR as well as all other possible log files
upvoted 1 times
...
somenkr
2 years, 8 months ago
It is , Read the question again.
upvoted 2 times
...
...
KingChuang
1 year, 3 months ago
On my exam 2022-12-26. Chose:D
upvoted 3 times
...
ray01
2 years, 11 months ago
Correct. If one will take a look at "CS09" line, it's clear that "ContentUploadService" is a container, so the first step should be "az container attach"
upvoted 12 times
maukaba
2 years, 4 months ago
A web app can be deployed both as source code and as a docker container. C it's correct see link https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-http-502-http-503
upvoted 1 times
...
...
...
clarionprogrammer
Highly Voted 2 years, 11 months ago
It is not A. "az webapp log" by itself is not a command. It would need to be "az webapp log tail" or "az webapp log download". https://docs.microsoft.com/en-us/cli/azure/webapp/log?view=azure-cli-latest
upvoted 14 times
...
james2033
Most Recent 2 weeks, 1 day ago
az container attach --resource-group myResourceGroup --name mycontainer https://learn.microsoft.com/en-us/azure/container-instances/container-instances-quickstart#attach-output-streams
upvoted 1 times
...
BaoNguyen2411
8 months ago
got this question on 29/06/2023
upvoted 1 times
...
NightshadeRC
8 months ago
Had this question today: 2023-07-26
upvoted 1 times
...
JH81
9 months, 1 week ago
Selected Answer: C
Another wonderfully obtuse question. I'm not going to disagree that ContentUploadService is hosted in a container but I think MS wants answer C.
upvoted 2 times
...
adilkhan
11 months, 3 weeks ago
A is the right answer. ContentUploadService has nothing to do with the CONTAINER!
upvoted 1 times
...
uffuchsi
1 year, 1 month ago
D - Scenario: The ContentAnalysisService is deployed with Azure Container Instances from a private Azure Container Registry named AmyImages. The solution will use eight CPU cores. When you have a misbehaving container in Azure Container Instances, start by viewing its logs with az container logs, and stream its standard out and standard error with az container attach. https://docs.microsoft.com/en-us/azure/container-instances/container-instances-get-logs
upvoted 3 times
...
AlexeyG
1 year, 1 month ago
Got this in 16/02/2023
upvoted 1 times
...
hubekpeter
1 year, 4 months ago
Selected Answer: D
https://learn.microsoft.com/en-us/azure/container-instances/container-instances-get-logs
upvoted 3 times
...
OPT_001122
1 year, 4 months ago
Selected Answer: D
az container attach
upvoted 2 times
...
TheExamMaster2020
1 year, 4 months ago
Did my exam on 15th November 2022. This test case and question was on it.
upvoted 1 times
...
gmishra88
1 year, 5 months ago
Without knowing what Microsoft thinks it is difficult to answer this question. * az monitor activity-log alert create can be used to create an alert. If you follow the page then that is the first step. Monitor the service health and for that create alerts. Thi tool can be used for that. https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-http-502-http-503 * az container attach : To get the current log output, but that is not a good option to debug this issue. I will bet on az monitor activity-log. And I'm changing my original answer from the first iteration of looking at the options
upvoted 2 times
gmishra88
1 year, 5 months ago
az monitor activity-log alert create -n {AlertName} -g {ResourceGroup} \ --condition category=ServiceHealth and level=Error
upvoted 1 times
...
gmishra88
1 year, 5 months ago
az container attach can be used in the second step of collect data (observer and monitor, collect data and mitigate) to get the log stream.
upvoted 1 times
...
gmishra88
1 year, 5 months ago
But it asks which you will use first then I guess Microsoft wants me to follow that step exactly like a machine and reading their manuals as soon as I face an issue. So it is definitely alerts in the first step; Observe and monitor. This is a horrible question to ask what I will do first. I will go get a coffee first, microsoft
upvoted 1 times
...
...
Eltooth
1 year, 9 months ago
Selected Answer: D
D is correct answer. az container attach
upvoted 5 times
...
heisenberg33
2 years, 1 month ago
Selected Answer: D
ContentUploadService is a container, see line CS06-CS09. Ref: https://docs.microsoft.com/en-us/azure/container-instances/container-instances-get-logs#attach-output-streams
upvoted 3 times
...
leonidn
2 years, 1 month ago
Selected Answer: D
ConentCotainerService is hosted in container services. Hense, the correct answer is az container attach. https://docs.microsoft.com/en-us/azure/container-instances/container-instances-get-logs#attach-output-streams
upvoted 4 times
...
lugospod
2 years, 2 months ago
My two cents... Based on info on 502 and 503 on page https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-http-502-http-503 It is possible that the root cause is "our" app or unavailability of Azure service For Azure services: Microsoft Azure publicizes each time there is a service interruption or performance degradation. Which leads to answer C For your own applications: A or D. A has no info which command it is using. If using DOWNLOAD it will give us some history info. If using TAIL it will give us real time info similar to D. So if this happens occasionally, there is a small chance that it will happen right when we are watching so I would rather go and check the history info - A. Now between A and C - both are correct because the problem could be caused by Azure also since it is occasionally occuring. So we need more info to decide if the problem is A or C.
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 ...