Metric Collection & Data Modeling Flashcards
7 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 7 Metric Collection & Data Modeling flashcards as text
What does the `quantile` label represent in a Prometheus Summary metric?
Answer: A pre-calculated percentile value over a sliding time window
The `quantile` label in a Summary represents a pre-calculated percentile (e.g., 0.95) computed client-side over a configurable sliding window.
A Pushgateway metric has a `job` label that conflicts with the scrape target's `job` label. What happens by default?
Answer: The pushed metric's label is preserved and the target's is renamed with `exported_` prefix
When label conflicts occur during scraping, Prometheus prefixes the conflicting scraped label with `exported_` and keeps the pushed metric's label.
Which function correctly calculates the per-second rate of increase of a counter over the last 5 minutes, accounting for resets?
Answer: rate(metric[5m])
`rate()` computes the per-second average rate of increase over the specified range, handling counter resets automatically.
In the Prometheus data model, what uniquely identifies a time series?
Answer: The metric name plus its set of label name-value pairs
A Prometheus time series is uniquely identified by the combination of its metric name and the complete set of label name-value pairs.
What is the primary difference between `rate()` and `irate()` in Prometheus?
Answer: `rate()` averages over the full range while `irate()` uses only the last two data points
`irate()` calculates the instantaneous rate using only the last two data points, making it more responsive to spikes but noisier than `rate()`.
When configuring a Prometheus scrape job, what does `honor_timestamps: true` do?
Answer: Uses the timestamps provided by the target's exposition format instead of the scrape time
`honor_timestamps: true` tells Prometheus to respect the timestamps embedded in the target's metric exposition rather than overriding them with the scrape time.
A developer adds a label called `__internal__` to a metric. What will Prometheus do with it?
Answer: Drop the label because labels beginning with `__` are reserved
Labels with names beginning with double underscores (`__`) are reserved for Prometheus internal use and are dropped from user-facing metrics.