Question 489 of 1,170
Monitor and Maintain Azure ResourcesmediumMultiple ChoiceObjective-mapped

AZ-104 Monitor and Maintain Azure Resources Practice Question

This AZ-104 practice question tests your understanding of monitor and maintain azure resources. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

CustomAppLogs_CL sample rows:
TimeGenerated            Status_s   Component_s  Message
2026-04-24T08:00:00Z     Failed     api          timeout
2026-04-24T08:03:00Z     Failed     api          timeout
2026-04-24T08:05:00Z     Success    api          ok
2026-04-24T08:07:00Z     Failed     api          auth error
2026-04-24T08:09:00Z     Failed     api          auth error
2026-04-24T08:11:00Z     Failed     api          auth error
The alert must trigger when at least 5 failed events occur in any 15-minute window.

Based on the exhibit, which KQL query should you use in a scheduled query alert to trigger only when five or more failed events occur within any 15-minute window?

Exhibit

CustomAppLogs_CL sample rows:
TimeGenerated            Status_s   Component_s  Message
2026-04-24T08:00:00Z     Failed     api          timeout
2026-04-24T08:03:00Z     Failed     api          timeout
2026-04-24T08:05:00Z     Success    api          ok
2026-04-24T08:07:00Z     Failed     api          auth error
2026-04-24T08:09:00Z     Failed     api          auth error
2026-04-24T08:11:00Z     Failed     api          auth error
The alert must trigger when at least 5 failed events occur in any 15-minute window.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

CustomAppLogs_CL | where TimeGenerated >= ago(1h) | where Status_s == 'Failed' | summarize FailedCount=count() by bin(TimeGenerated, 15m) | where FailedCount >= 5

Option B is correct because it filters for 'Failed' events in the last hour, groups them into 15-minute bins using `bin(TimeGenerated, 15m)`, and then counts them. The `where FailedCount >= 5` condition triggers the alert only when five or more failed events occur within any single 15-minute window, matching the requirement exactly.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • CustomAppLogs_CL | where TimeGenerated >= ago(15m) | where Status_s == 'Failed' | summarize FailedCount=count() by bin(TimeGenerated, 1h) | where FailedCount >= 5

    Why it's wrong here

    This query uses a one-hour bin, which is too large for a 15-minute alert condition. It also ignores failures outside the last 15 minutes only partially matching the requirement.

    When this WOULD be correct

    This query would be correct if the alert required five or more failed events within any 1-hour window, with the time range also set to 1 hour.

  • CustomAppLogs_CL | where TimeGenerated >= ago(1h) | where Status_s == 'Failed' | summarize FailedCount=count() by bin(TimeGenerated, 15m) | where FailedCount >= 5

    Why this is correct

    This query filters to the recent hour, keeps only failed events, groups them into 15-minute bins, and returns only bins with five or more failures. That matches the alert requirement directly.

    Related concept

    Read the scenario before looking for a memorised answer.

  • CustomAppLogs_CL | where TimeGenerated >= ago(1h) | summarize FailedCount=count() by bin(TimeGenerated, 15m) | where FailedCount >= 5

    Why it's wrong here

    This query counts every event, including successful ones, so it can trigger even when there are not five failures. The failure condition is missing.

    When this WOULD be correct

    This query would be correct if the question asked to trigger an alert when five or more total events (regardless of status) occur within any 15-minute window, and the status field was irrelevant.

  • CustomAppLogs_CL | where TimeGenerated >= ago(1h) | where Status_s == 'Failed' | summarize FailedCount=count() by bin(TimeGenerated, 15m) | where FailedCount > 0

    Why it's wrong here

    This query would return any 15-minute bin with at least one failure, which is far too sensitive. The requirement is five or more failures, not just one.

    When this WOULD be correct

    This query would be correct if the requirement was to trigger an alert whenever any failed event occurs within a 15-minute window (i.e., threshold of at least one failure).

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.

CustomAppLogs_CL | where TimeGenerated >= ago(1h) | where Status_s == 'Failed' | summarize FailedCount=count() by bin(TimeGenerated, 15m) | where FailedCount >= 5Correct answer

Why this is correct

This query filters to the recent hour, keeps only failed events, groups them into 15-minute bins, and returns only bins with five or more failures. That matches the alert requirement directly.

CustomAppLogs_CL | where TimeGenerated >= ago(15m) | where Status_s == 'Failed' | summarize FailedCount=count() by bin(TimeGenerated, 1h) | where FailedCount >= 5Wrong answer — click to see why

Why this is wrong here

The query uses a 1-hour bin size, so it counts failed events per hour, not per 15-minute window. This would not trigger correctly for five or more failures within any 15-minute period.

★ When this WOULD be the correct answer

This query would be correct if the alert required five or more failed events within any 1-hour window, with the time range also set to 1 hour.

Why candidates choose this

Candidates may mistakenly think that using a larger bin size (1h) still captures the 15-minute requirement, or they overlook the bin size parameter and focus only on the count threshold.

CustomAppLogs_CL | where TimeGenerated >= ago(1h) | summarize FailedCount=count() by bin(TimeGenerated, 15m) | where FailedCount >= 5Wrong answer — click to see why

Why this is wrong here

The query does not filter for 'Failed' events (missing `where Status_s == 'Failed'`), so it counts all events, not just failed ones, making the alert trigger incorrectly.

★ When this WOULD be the correct answer

This query would be correct if the question asked to trigger an alert when five or more total events (regardless of status) occur within any 15-minute window, and the status field was irrelevant.

Why candidates choose this

Candidates may overlook the need to filter by status, assuming the count is already limited to failed events, or they might mistakenly think the query is equivalent to option B.

CustomAppLogs_CL | where TimeGenerated >= ago(1h) | where Status_s == 'Failed' | summarize FailedCount=count() by bin(TimeGenerated, 15m) | where FailedCount > 0Wrong answer — click to see why

Why this is wrong here

The query filters for `FailedCount > 0`, which includes any window with at least one failure, not specifically five or more. The alert would trigger on any failed event, not only when five or more occur.

★ When this WOULD be the correct answer

This query would be correct if the requirement was to trigger an alert whenever any failed event occurs within a 15-minute window (i.e., threshold of at least one failure).

Why candidates choose this

Candidates may mistakenly think that `FailedCount > 0` is equivalent to `FailedCount >= 5` because they focus on the aggregation and binning but overlook the specific threshold condition.

Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse the lookback period (`ago(1h)`) with the aggregation window (`bin(..., 15m)`), leading them to pick Option A with a 1-hour bin, which fails to meet the 'any 15-minute window' requirement.

Detailed technical explanation

How to think about this question

The `bin()` function in KQL creates fixed-size time buckets; for a 15-minute window, `bin(TimeGenerated, 15m)` aligns events to the nearest 15-minute boundary (e.g., 00:00, 00:15, 00:30). In a scheduled query alert, the `ago(1h)` lookback ensures the query evaluates the last hour of data, but the bin size controls the aggregation window—critical for detecting bursts of failures. A real-world scenario is monitoring authentication failures: using a 1-hour bin might miss a spike of five failures in 10 minutes, while a 15-minute bin captures it accurately.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related AZ-104 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free AZ-104 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AZ-104 question test?

Monitor and Maintain Azure Resources — This question tests Monitor and Maintain Azure Resources — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: CustomAppLogs_CL | where TimeGenerated >= ago(1h) | where Status_s == 'Failed' | summarize FailedCount=count() by bin(TimeGenerated, 15m) | where FailedCount >= 5 — Option B is correct because it filters for 'Failed' events in the last hour, groups them into 15-minute bins using `bin(TimeGenerated, 15m)`, and then counts them. The `where FailedCount >= 5` condition triggers the alert only when five or more failed events occur within any single 15-minute window, matching the requirement exactly.

What should I do if I get this AZ-104 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More AZ-104 practice questions

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This AZ-104 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-104 exam.