PCA PCA Federation & Remote Storage 2 — Questions and Answers
Question 1: In cross-service federation, which metrics are typically federated up to a global Prometheus server?
- Every raw metric from every service target
- Pre-aggregated or recording-rule-generated metrics relevant at the global level (Correct answer)
- Only metrics whose names start with a specific prefix
- Metrics that have been flagged by Alertmanager as critical
Correct answer: Pre-aggregated or recording-rule-generated metrics relevant at the global level
Cross-service federation is used to pull a curated subset of high-level metrics (often generated by recording rules) rather than all raw data, keeping the global Prometheus lean.
Question 2: What happens to 'job' and 'instance' labels when metrics are federated from one Prometheus server to another?
- They are automatically dropped to avoid conflicts
- They are renamed with a 'source_' prefix by default
- They are preserved as-is from the originating Prometheus server (Correct answer)
- They are replaced by the federating server's own job and instance labels
Correct answer: They are preserved as-is from the originating Prometheus server
When Prometheus federates metrics, it preserves the original labels including job and instance, because honor_labels defaults to true in typical federation scrape configs.
Question 3: Which open-source project extends Prometheus with global query capability and long-term object storage integration?
- Loki
- Thanos (Correct answer)
- Jaeger
- OpenTelemetry Collector
Correct answer: Thanos
Thanos adds a sidecar to Prometheus that uploads blocks to object storage (e.g., S3, GCS) and provides a global query layer across multiple Prometheus instances.
Question 4: What does the queue_config section within a remote_write block control?
- The order in which scrape targets are processed
- Tuning parameters for the in-memory send queue such as capacity, batch size, and retry behavior (Correct answer)
- Priority levels assigned to individual metric series
- Alert notification delivery queues in Alertmanager
Correct answer: Tuning parameters for the in-memory send queue such as capacity, batch size, and retry behavior
queue_config lets operators tune how many samples are buffered, how large each batch is, and how Prometheus handles backpressure or failures when writing to remote storage.
Question 5: Which long-term Prometheus storage solution is developed and maintained by Grafana Labs?
- VictoriaMetrics
- Cortex
- Mimir (Correct answer)
- InfluxDB
Correct answer: Mimir
Grafana Mimir is the current open-source, horizontally scalable long-term storage solution for Prometheus developed by Grafana Labs, succeeding Cortex.
Question 6: What does setting 'honor_labels: true' in a Prometheus scrape_config do when used for federation?
- Enforces mandatory label requirements on all scraped metrics
- Preserves labels from the scraped target when they conflict with externally-set labels (Correct answer)
- Sorts all metric labels alphabetically before storage
- Validates that label names conform to Prometheus naming rules
Correct answer: Preserves labels from the scraped target when they conflict with externally-set labels
honor_labels: true instructs Prometheus to keep the target's own labels intact instead of overwriting them with external labels like job or instance defined in the scrape config.
Question 7: What flag must be passed to a Prometheus server to allow it to accept remote_write data from other Prometheus instances?
- --web.enable-remote-write-receiver (Correct answer)
- --storage.tsdb.accept-remote-write
- --remote-write-listener
- --enable.push-receiver
Correct answer: --web.enable-remote-write-receiver
The --web.enable-remote-write-receiver flag activates the /api/v1/write endpoint so that Prometheus can act as a remote_write target for other Prometheus servers.
In cross-service federation, which metrics are typically federated up to a global Prometheus server?