PCA PCA Federation & Remote Storage 1 — Questions and Answers
Question 1: What is the primary purpose of Prometheus federation?
- Encrypting metrics at rest across clusters
- Aggregating metrics from multiple Prometheus servers into a single instance (Correct answer)
- Automatically discovering scrape targets across namespaces
- Connecting Prometheus directly to Grafana dashboards
Correct answer: Aggregating metrics from multiple Prometheus servers into a single instance
Federation allows one Prometheus server to scrape selected metrics from another, enabling hierarchical aggregation across clusters or data centers.
Question 2: Which HTTP endpoint must be exposed on a Prometheus server for another Prometheus to federate from it?
- /metrics
- /api/v1/query
- /federate (Correct answer)
- /api/v1/targets
Correct answer: /federate
The /federate endpoint is specifically designed to allow other Prometheus servers to scrape selected time series from it.
Question 3: Which query parameter is required when scraping the /federate endpoint to specify which metrics to pull?
- filter=
- match[]= (Correct answer)
- selector=
- metric_filter=
Correct answer: match[]=
The match[] parameter accepts one or more instant vector selectors to specify which metric series should be included in the federation response.
Question 4: What is the primary use case for hierarchical federation in a large enterprise environment?
- Sending alerts from multiple clusters to a single Alertmanager
- Collecting aggregated metrics from multiple data centers into a global Prometheus (Correct answer)
- Replicating raw metrics for high availability failover
- Reducing per-target scrape intervals across regions
Correct answer: Collecting aggregated metrics from multiple data centers into a global Prometheus
Hierarchical federation is used to build a global Prometheus that scrapes aggregated or pre-recorded metrics from datacenter-level Prometheus servers.
Question 5: What does the remote_write configuration block in prometheus.yml enable?
- Reading historical metrics from a remote TSDB
- Forwarding sampled metrics to a remote storage backend in near-real-time (Correct answer)
- Pushing alert rules to an external rules engine
- Streaming live metrics to connected Grafana instances
Correct answer: Forwarding sampled metrics to a remote storage backend in near-real-time
remote_write sends metric samples to a compatible remote storage endpoint as they are ingested, enabling long-term or scalable storage.
Question 6: Which encoding format does Prometheus use by default when sending data via remote_write?
- JSON over plain HTTP
- MessagePack over WebSockets
- Protocol Buffers with Snappy compression over HTTPS (Correct answer)
- Avro with gzip compression over gRPC
Correct answer: Protocol Buffers with Snappy compression over HTTPS
Prometheus remote_write serializes metric samples using Protocol Buffers and compresses the payload with Snappy before sending over HTTP(S).
Question 7: What is the purpose of the remote_read configuration in Prometheus?
- Importing recording rules from a remote Prometheus instance
- Querying historical metric data from a remote storage system to satisfy PromQL queries (Correct answer)
- Receiving metrics pushed from remote exporters via HTTP
- Fetching service discovery target lists from a remote endpoint
Correct answer: Querying historical metric data from a remote storage system to satisfy PromQL queries
remote_read allows Prometheus to transparently query a remote storage backend for historical data when the local TSDB does not cover the requested time range.
What is the primary purpose of Prometheus federation?