PCA Prometheus Architecture & Components 2 — Questions and Answers
Question 1: Which Prometheus component is responsible for short-term storage of time-series data on local disk?
- Alertmanager
- TSDB (Time Series Database) (Correct answer)
- Pushgateway
- Grafana
Correct answer: TSDB (Time Series Database)
Prometheus uses its built-in TSDB to store scraped samples locally on disk in a compressed, chunked format.
Question 2: What is the default retention period for data stored in Prometheus's local TSDB?
- 7 days
- 15 days (Correct answer)
- 30 days
- 1 day
Correct answer: 15 days
By default, Prometheus retains local TSDB data for 15 days unless overridden with --storage.tsdb.retention.time.
Question 3: Which component would you use to expose batch job metrics when the job does not run long enough to be scraped?
- Node Exporter
- Alertmanager
- Pushgateway (Correct answer)
- Blackbox Exporter
Correct answer: Pushgateway
The Pushgateway acts as an intermediary that accepts pushed metrics from short-lived jobs so Prometheus can scrape them later.
Question 4: In Prometheus's federation model, what type of Prometheus instance scrapes metrics from other Prometheus instances?
- Leaf Prometheus
- Global Prometheus (Correct answer)
- Remote Prometheus
- Aggregator Exporter
Correct answer: Global Prometheus
A global (or federated) Prometheus scrapes aggregated or filtered metrics from multiple leaf Prometheus servers via their /federate endpoint.
Question 5: Which HTTP endpoint does Prometheus expose so that another Prometheus instance can scrape a subset of its metrics?
- /metrics
- /federate (Correct answer)
- /api/v1/query
- /targets
Correct answer: /federate
The /federate endpoint accepts match[] query parameters and returns matching time-series in Prometheus text format for hierarchical federation.
Question 6: What role does the Prometheus service discovery mechanism play in the architecture?
- It stores alert rules
- It dynamically finds scrape targets without static configuration (Correct answer)
- It compresses TSDB blocks
- It routes alerts to receivers
Correct answer: It dynamically finds scrape targets without static configuration
Service discovery (e.g., Kubernetes SD, Consul SD) allows Prometheus to automatically detect and update scrape targets as infrastructure changes.
Question 7: Which Prometheus internal component evaluates recording and alerting rules at regular intervals?
- Retrieval (scrape loop)
- Rule evaluation engine (Correct answer)
- WAL (Write-Ahead Log)
- Notifier queue
Correct answer: Rule evaluation engine
Prometheus's rule evaluation engine runs at a configurable interval (evaluation_interval) and computes rule results, storing them or forwarding alerts.
Which Prometheus component is responsible for short-term storage of time-series data on local disk?