exam questions

Exam AZ-104 All Questions

View all questions & answers for the AZ-104 exam

Exam AZ-104 topic 2 question 42 discussion

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

You have an Azure subscription named Subscription1 that contains an Azure Log Analytics workspace named Workspace1.
You need to view the error events from a table named Event.
Which query should you run in Workspace1?

  • A. Get-Event Event | where {$_.EventType == "error"}
  • B. Event | search "error"
  • C. select * from Event where EventType == "error"
  • D. search in (Event) * | where EventType ג€"eq ג€errorג€
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
NaoVaz
Highly Voted 2 years, 5 months ago
Selected Answer: B
B) 'Event | search "error"' Reference: https://docs.microsoft.com/en-us/azure/azure-monitor/logs/log-analytics-tutorial
upvoted 13 times
AnKiLa
2 years, 1 month ago
Agree. Found another reference too: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/searchoperator?pivots=azuredataexplorer
upvoted 2 times
...
...
Bravo_Dravel
Most Recent 1 month, 1 week ago
Selected Answer: B
Other correct versions of this question: 1. search in (Event) "error" 2. Event | search "error" 3. Event | where EventType == "error"
upvoted 4 times
...
[Removed]
6 months ago
Selected Answer: B
B is corerct
upvoted 1 times
...
3c5adce
10 months ago
C. select * from Event where EventType == "error" This query selects all columns (*) from the "Event" table where the EventType column is equal to "error". It effectively filters the rows in the "Event" table to only those where the EventType is "error", which is what you need to view the error events. The reason why it’s not B. Event | search "error" is that this query selects all records from the "Event" table and then filters them for the string "error". While this query might work in some contexts, it doesn't directly filter based on the EventType column being "error". It searches for the string "error" within all columns.
upvoted 3 times
...
MCLC2021
10 months ago
Selected Answer: B
Repeated question Topic2.Question22 Correct answer B
upvoted 3 times
...
Amir1909
1 year ago
B is correct
upvoted 1 times
...
Oryx360
1 year, 6 months ago
Selected Answer: C
The correct query to view error events from a table named "Event" in Azure Log Analytics workspace is: C. select * from Event where EventType == "error" This query will retrieve all the records from the "Event" table where the EventType is equal to "error," allowing you to view only the error events.
upvoted 3 times
EwoutBI
1 year, 1 month ago
That's not valid KQL, try it with this sample code let MyInMemoryTable = datatable(EventType: string, EventMessage: string, EventTime: datetime) [ "error", "Something bad occurred in the application.", datetime(2024-01-09T13:00:00), "warning", "A warning was logged by the application, be careful of error", datetime(2024-01-09T14:00:00), "info", "Informational message from the application.", datetime(2024-01-09T15:00:00), "error", "Oh noes occurred in the application.", datetime(2024-01-09T16:00:00) ]; SELECT * FROM (MyInMemoryTable) where EventType == "error"
upvoted 1 times
...
...
XtraWest
1 year, 8 months ago
Event | where SeverityLevel == "Error" Correct Answer: B
upvoted 1 times
...
Athul07
1 year, 9 months ago
C. select * from Event where EventType == "error" To view the error events from a table named Event in the Azure Log Analytics workspace named Workspace1, you should run the query: select * from Event where EventType == "error" This query selects all the columns (*) from the Event table where the EventType is equal to "error". It will retrieve all the error events from the Event table in Workspace1. The other options provided are not valid for querying data in Azure Log Analytics. They do not use the correct syntax or functions for querying data in Log Analytics.
upvoted 1 times
sedex
1 year, 7 months ago
select * from Event where EventType == "error" is an example of SQL (Structured Query Language) whereas Log Analytics uses KQL (Kusto Query Language). The correct answer is B
upvoted 5 times
...
...
gauravit43
2 years, 1 month ago
B - Tested in lab (Event | search "error")
upvoted 2 times
...
virgilpza
2 years, 6 months ago
Selected Answer: B
Correct Answer: B
upvoted 2 times
...
KSoul
2 years, 6 months ago
Selected Answer: B
Event | search "error"
upvoted 2 times
...
libran
2 years, 6 months ago
Selected Answer: B
Correct Answer: B
upvoted 2 times
...
EmnCours
2 years, 6 months ago
Selected Answer: B
Correct Answer: B
upvoted 2 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