You need a chart of failed requests per 5 minutes over the last day in Application Insights. Which KQL query fits?
- Exam domain
- Secure, monitor, and troubleshoot Azure solutions20–25% of the exam
- Difficulty
- Medium
- In this mock
- 14 questions on this domainPractise this domain
Why the exam asks this
Secure, monitor, and troubleshoot Azure solutions: Monitor and troubleshoot Azure solutions.
Objective in the exam guide: Write KQL queries to analyze logs and metrics.
Every Azure Monitor investigation runs on KQL. The exam checks you can build a basic time-series query.
Why A is the answer
requests | where timestamp > ago(1d) and success == false | summarize count() by bin(timestamp, 5m) | render timechart
Filter to the time range and failed requests, then group counts into 5-minute bins with summarize and bin, and render a time chart.
Remember: Time series in KQL: where, then summarize count() by bin(timestamp, interval).
How it works
KQL queries pipe a table through operators: where filters rows, summarize aggregates, render draws a chart.
summarize count() by bin(timestamp, 5m) counts rows per 5-minute bucket.
Application Insights tables include requests, dependencies, exceptions and traces.
Clues in the question
The words that point to the answer, and what each one tells you.
- Failed requests
- where success == false.
- Per 5 minutes
- bin(timestamp, 5m).
- Last day
- ago(1d).
In detail
- bin() rounds timestamps down to a fixed interval, which is how time series are grouped.
- The success column in requests is false for failed requests.
Side by side with look-alikes
| Operator | Does |
|---|---|
| where | Filters rows |
| summarize ... by bin() | Aggregates per time bucket |
| render timechart | Draws a time chart |
| take | Returns some rows, no order |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. requests | where timestamp > ago(1d) and success == false | summarize count() by bin(timestamp, 5m) | render timechartRight
Time series in KQL: where, then summarize count() by bin(timestamp, interval).
B. requests | take 5m | where success == trueWrong
take returns a number of rows, not a time window, and the filter selects successes.
C. exceptions | project timestamp | sort by nameWrong
This lists exceptions without counting them over time.
D. requests | summarize avg(duration) by nameWrongMost tempting
This averages duration, not failures over time.
Why it tempts: It is a valid, useful query on the same table. But it measures speed per operation, not failures over time.
In practice
- Save useful queries as alert rules, such as failures above a threshold in 5 minutes.
Use case
An illustrative scenario, not a real incident.
An on-call engineer spots a spike of failures at 14:05 on the chart and opens the matching traces.
See how it works
flowchart LR T["requests"] --> W["where timestamp > ago(1d) and success == false"] W --> S["summarize count() by bin(timestamp, 5m)"] S --> R["render timechart"]
How to read this chart
- Read it in order: requests, then where timestamp > ago(1d) and success == false, then summarize count() by bin(timestamp, 5m), then render timechart.