Skip to content

PromQL Questions

Practice questions for PromQL topic in Prometheus Certified Associate. 56 questions covering this domain.

56 questions12 easy29 medium15 hard
Q1
hard

An operator sees the annotation `input to histogram_quantile needed to be fixed for monotonicity` after aggregating classic histogram buckets. What do...

Q2
medium

A recording rule should store a per-second counter rate so later queries stay consistent. Which function should the rule use?

Q3
easy

What data type does the selector `http_requests_total[5m]` return in PromQL?

Q4
medium

How does adding the `bool` modifier change a comparison operator such as `>` in PromQL?

Q5
medium

Why is the selector `{job=~'.*'}` illegal in PromQL?

Q6
hard

An alert should fire only when a metric has been completely absent for the last hour. Which function matches that intent?

Q7
medium

A dashboard needs to show a fast-moving, bursty counter with more sensitivity to the latest two samples. Which function is most appropriate?

Q8
easy

Where must the `offset` modifier appear in valid PromQL syntax?

Q9
medium

What does `topk(5, memory_consumption_bytes)` return?

Q10
medium

A team is creating an alert on a request counter over the last 5 minutes. Which function is the recommended choice?

Q11
easy

A user writes the matcher `env=~'prod|stage'`. How does Prometheus treat that regular expression?

Q12
medium

For a range selector such as `http_requests_total[5m]`, which timestamps are included?

Q13
hard

A team wants the 90th percentile request duration from a classic histogram, aggregated by `job`. Which expression structure is correct?

Q14
hard

A query divides per-method-and-code HTTP error rates by per-method request rates. The left side has more series because it includes `code`, and matchi...

Q15
medium

The function `label_replace(v, "dst_label", "replacement", "src_label", "regex")` in PromQL:

Q16
medium

What does `clamp_min(cpu_usage, 0)` do in PromQL?

Q17
medium

What does `absent(up{job="myapp"})` return when at least one `up{job="myapp"}` time series is currently present?

Q18
medium

What does `increase(http_requests_total[1h])` calculate?

Q19
easy

What does `count(http_requests_total)` return in PromQL?

Q20
medium

For a gauge `request_queue_length`, what does `changes(request_queue_length[5m])` return?

Sign in to see all 56 questions

Create a free account to browse all questions — completely free during our launch phase.