PCA Recording Rules & Aggregation Flashcards
6 cards from real PCA practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 PCA Recording Rules & Aggregation flashcards as text
What is the purpose of `partial_response_strategy` in Thanos when querying recording rules stored in object storage?
Answer: It controls whether queries return partial results when some store nodes are unavailable
Thanos's partial_response_strategy decides whether to return available data or fail the entire query when some store shards don't respond.
How can recording rules help reduce the load on Prometheus during Grafana dashboard queries?
Answer: Pre-computed results are stored as simple time series so dashboards query low-cost instant vectors instead of expensive range computations
Dashboards that query pre-computed recording rule metrics avoid running expensive PromQL aggregations on every refresh, reducing CPU load significantly.
What does the `group_left` modifier do in a PromQL join, commonly used in recording rules?
Answer: It performs a many-to-one join, carrying labels from the right-hand side onto many left-hand series
group_left allows a many-to-one vector matching where multiple left-side series match one right-side series, copying right-side labels onto the result.
In Prometheus recording rules, what is the effect of using `sum without (instance)` in the expression?
Answer: It sums all matching series and drops the instance label from the result, aggregating across all instances
sum without (instance) aggregates series together by removing the instance dimension, producing per-job or per-cluster totals.
What is a 'rule group' in Prometheus, and why does ordering within a group matter?
Answer: A named set of rules evaluated sequentially, so later rules can depend on metric outputs of earlier rules in the same group
Rules within a group are evaluated in order, allowing a recording rule to produce a metric that a subsequent rule or alert in the same group can immediately reference.
Which promtool subcommand runs unit tests against Prometheus alerting and recording rules?
Answer: promtool test rules
The `promtool test rules` command executes YAML-based unit tests that assert expected metric values and alert states from rule expressions.