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 is the purpose of the `scrape_duration_seconds` metric that Prometheus automatically generates?
Answer: Records how long the last scrape of a target took
`scrape_duration_seconds` is a per-target metric Prometheus auto-generates to record the elapsed time for each scrape operation.
Which Prometheus configuration option controls how often a target is scraped if not overridden at the job level?
Answer: `scrape_interval`
`scrape_interval` in the global configuration sets the default frequency at which Prometheus collects metrics from targets.
In Prometheus metric naming conventions, what does a metric ending in `_bytes` indicate?
Answer: The metric unit is bytes, following the base unit convention
Prometheus conventions require metrics to include their unit as a suffix using base units, so `_bytes` indicates the metric measures byte quantities.
Which exposition format field declares the type of a metric before its samples appear?
Answer: `# TYPE`
The `# TYPE` line in the Prometheus text exposition format declares the metric type (counter, gauge, histogram, summary, or untyped).
What happens to a Prometheus histogram when you want to calculate a quantile from it using PromQL?
Answer: Use `histogram_quantile()` with the `_bucket` time series
`histogram_quantile(φ, rate(metric_bucket[5m]))` calculates a quantile from a histogram by interpolating across the `_bucket` cumulative counts.
A Prometheus target exposes 500,000 unique time series. What is the primary concern with this configuration?
Answer: High cardinality causing excessive memory usage in Prometheus
High cardinality (many unique label combinations) causes Prometheus to consume large amounts of memory to store and index all time series.
Which label is automatically added by Prometheus to every scraped metric to identify where it was collected from?
Answer: `instance`
Prometheus automatically adds the `instance` label to scraped metrics, typically set to the `host:port` of the scrape target.