Prometheus Architecture & Components 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 Prometheus Architecture & Components flashcards as text
What is the primary difference between a Counter and a Gauge metric type in Prometheus?
Answer: Counters only increase (or reset to zero); Gauges can go up or down
A Counter is a monotonically increasing value (e.g., total requests), while a Gauge represents an instantaneous value that can rise or fall (e.g., current memory usage).
Which Prometheus configuration file section defines how often the server scrapes each target?
Answer: global.scrape_interval
The global.scrape_interval setting (default 1m) controls how frequently Prometheus sends HTTP requests to each target's /metrics endpoint.
What is the role of the 'Retrieval' subsystem within the Prometheus server?
Answer: It manages the scrape loops that fetch metrics from configured targets
The Retrieval subsystem maintains per-target scrape goroutines, sends HTTP GET requests, parses the exposition format, and passes samples to the storage layer.
When Prometheus is deployed in a multi-cluster environment, which open-source project extends it with global query view and long-term storage without modifying the Prometheus binary?
Answer: Thanos
Thanos sidecars attach to each Prometheus instance, uploading blocks to object storage and exposing a Store API, enabling a global query layer across clusters.
Which label is automatically added by Prometheus to every scraped sample to identify the origin job defined in scrape_configs?
Answer: job
Prometheus automatically attaches the 'job' label (set to the job_name value in scrape_configs) to every sample, identifying which scrape configuration group produced it.
What does the Prometheus HTTP API endpoint /api/v1/query_range return?
Answer: A matrix of values for a PromQL expression evaluated over a time range with a step interval
/api/v1/query_range evaluates a PromQL expression at multiple evenly-spaced timestamps between start and end, returning a matrix result used for graphing.
In Prometheus architecture, what is the purpose of 'honor_labels: true' in a scrape_config?
Answer: It preserves conflicting labels from scraped metrics instead of renaming them with an 'exported_' prefix
When honor_labels is true, Prometheus keeps labels from the scraped data as-is if they conflict with server-added labels, rather than prefixing the scraped ones with 'exported_'.