28% of the PCA exam. Sample questions below; the full library has 22 questions tagged to this domain.
Sample questions on PromQL
PromQL
Q1. You write `node_memory_MemTotal_bytes - node_memory_MemFree_bytes`. What is required for each pair of samples from the two vectors to match, producing a result?
Reveal answer and explanations
AThe two series must share the same metric name to be considered compatible for arithmetic in the PromQL engine
Incorrect. Identical metric names are neither required nor sufficient for vector matching.
BIdentical labels (except `__name__`), or use `on`/`ignoring`
Correct. By default PromQL does one-to-one matching on all labels except `__name__`; `on(...)` or `ignoring(...)` modifies which labels are used, and `group_left`/`group_right` enable many-to-one matches.
CThe two series must be produced by the exact same exporter process on the same host at the same sample time
Incorrect. Matching is done on labels, independent of source process.
DArithmetic between two instant vectors is not allowed and requires scalar conversion first via the `scalar()` call
Incorrect. Binary operators between instant vectors are a core PromQL feature.
PromQL
Q2. You need to alert when `up{job="payments"}` has not returned any samples for 10 minutes (the target disappeared entirely from service discovery or stopped being scraped). Which expression most precisely captures that condition?
Reveal answer and explanations
A`up{job="payments"} == 0`
Incorrect. `== 0` fires only while the series exists and is zero; if the target disappears entirely, the series is absent and this expression returns no samples.
B`rate(up{job="payments"}[10m]) == 0` given that exemplar ingestion is enabled and the TSDB exemplar ring buffer has not yet overflowed
Incorrect. `rate(up[10m])` on a missing series yields no samples, so the comparison does not fire.
C`max(up{job="payments"}) < 1`
Incorrect. `max(...)` over a non-existent series returns nothing, not a value less than 1.
D`absent_over_time(up{job="payments"}[10m])`
Correct. `absent_over_time()` returns `1` when no samples matched the selector over the entire range, which is precisely the 'target gone' condition.
PromQL
Q3. What is the key difference between `avg(metric)` and `avg_over_time(metric[5m])`?
Reveal answer and explanations
A`avg()` across series at an instant; `avg_over_time()` across time
Correct. `avg()` is an aggregation operator that averages values of different series at the evaluation instant; `avg_over_time()` averages samples of each series across the specified range.
BThey are aliases for the same computation under different grammar rules for convenience in the language itself
Incorrect. They compute different things along different dimensions.
C`avg()` works only on counters while `avg_over_time()` works only on gauges in strict mode during evaluation
Incorrect. Metric type is not what distinguishes them.
D`avg()` uses SI decimal units and `avg_over_time()` uses binary IEC units internally for the numeric output
Incorrect. Units are unrelated to the distinction.
PromQL
Q4. You want the maximum, over the last 30 minutes, of the 1-minute request rate per service. Which subquery is correct?
Reveal answer and explanations
A`max_over_time(rate(requests_total[1m])[30m:])`
Correct. The subquery `[30m:]` samples the inner instant vector over the last 30 minutes, and `max_over_time()` returns the maximum of those sampled rates.
B`max(rate(requests_total[30m]))`
Incorrect. `rate(requests_total[30m])` averages over 30 minutes; it does not capture the peak of 1-minute rates.
C`rate(max_over_time(requests_total[1m])[30m:])`
Incorrect. Taking `max_over_time()` on the raw counter and then computing `rate()` does not produce per-minute rate peaks.
D`max_over_time(requests_total[30m])`
Incorrect. This returns the maximum counter value, not the maximum 1-minute rate.
PromQL
Q5. How does `irate()` differ from `rate()` in PromQL?
Reveal answer and explanations
AUses only the last two samples; reactive but noisy
Correct. `irate()` uses just the final two samples in the range, so it reacts fast to change but is sensitive to noise and can alias with low-frequency scrapes; `rate()` averages across the whole window.
B`irate()` silently ignores counter resets, producing negative spikes after process restarts on long-running targets
Incorrect. Both handle counter resets similarly.
C`irate()` returns percentages of the previous scrape value instead of per-second rates in the result output
Incorrect. Both return per-second rates, not percentages.
D`irate()` can only be applied to gauge metrics, whereas `rate()` applies exclusively to counters in PromQL syntax
Incorrect. Both are designed for counters, not gauges.
PromQL accounts for 28% of the PCA exam. Expect questions that test recall of terminology and the ability to read short scenarios — not deep configuration. Use the sample questions above as difficulty calibration; if any feel hard, the rest of our 22-question domain bank will close those gaps.