โ† All PCA Flashcard Decks

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
  1. Which PromQL function is most commonly used in recording rules to compute per-second rates from counters?

    Answer: rate()

    rate() computes the per-second average rate of a counter over a time range and is the standard function for counter-based recording rules.

  2. What is the benefit of using `without` instead of `by` in aggregation expressions within recording rules?

    Answer: without drops specified labels and keeps all others, making rules more resilient to new labels being added

    Using without means you only specify labels to remove; any newly added labels are automatically included in the aggregation grouping.

  3. In a recording rule, what does the `labels` field allow you to do?

    Answer: Add or overwrite labels on the resulting recorded metric

    The labels field in a recording rule attaches additional static labels to all series written by that rule.

  4. Why is it important to align a recording rule's range vector window with its evaluation interval?

    Answer: Using a window shorter than the interval can cause samples to be missed, producing inaccurate rates

    If the range window is shorter than the evaluation interval, some scrape samples may fall outside the window, creating holes in computed rates.

  5. What is stale marker handling in the context of Prometheus recording rules?

    Answer: When a source series disappears, Prometheus marks recorded outputs as stale so dashboards show gaps instead of stale values

    Prometheus propagates staleness from input series to recording rule outputs, causing downstream metrics to also show as stale/missing when the source goes away.

  6. Which Prometheus flag or API allows you to check whether rule files are valid before loading them?

    Answer: promtool check rules

    The `promtool check rules` command validates the syntax and PromQL expressions in rule files without starting a Prometheus server.