← PCA hub

PCA — Prometheus Fundamentals

20% of the PCA exam. Sample questions below; the full library has 34 questions tagged to this domain.

Sample questions on Prometheus Fundamentals

Prometheus Fundamentals

Q1. Consider the metric name `http_requests_total`. Which Prometheus naming conventions does it follow?

Reveal answer and explanations
  1. A Application prefix (`http_`) and `_total` suffix on a counter

    Correct. Conventions are: lowercase with underscores, a domain prefix (like `http_`), and a `_total` suffix on counters; unit suffixes like `_seconds` or `_bytes` apply to gauges and histograms.

  2. B Process prefix (`process_`) and `_seconds` suffix on a duration

    Incorrect. `process_` is the prefix reserved by the Prometheus client library for process-level metrics.

  3. C Namespace prefix (`node_`) indicating a node_exporter metric

    Incorrect. `node_` is the prefix owned by node_exporter; unrelated to this example.

  4. D Use of camelCase as required by the exposition format

    Incorrect. Prometheus exposition uses snake_case, not camelCase.

Prometheus Fundamentals

Q2. Prometheus crashes mid-ingestion. On restart, it replays the Write-Ahead Log (WAL). What is the purpose of this replay?

Reveal answer and explanations
  1. A To rebuild the in-memory head block and recover samples that had not yet been persisted to on-disk blocks, avoiding data loss

    Correct. The WAL captures samples as they are ingested; on restart, replaying the WAL reconstructs the head block so recent samples are not lost.

  2. B To compact all on-disk blocks before accepting new scrapes

    Incorrect. Compaction is a background process triggered on block age, not part of WAL replay.

  3. C To resend samples to remote-write endpoints exactly once

    Incorrect. Remote write has its own queue; WAL replay is about local head reconstruction.

  4. D To reverify SHA-256 checksums of every historical block on disk in typical single-replica deployments where the WAL has already been replayed

    Incorrect. Historical block checksums are not reverified at startup; WAL replay concerns unpersisted head samples.

Prometheus Fundamentals

Q3. What role do labels play in the Prometheus data model?

Reveal answer and explanations
  1. A They provide a free-text description of the metric's purpose for human documentation inside the UI tools

    Incorrect. Text documentation lives in `HELP` lines in the exposition format, not labels.

  2. B They are a storage optimization hint to the TSDB compactor during block merging and head compaction

    Incorrect. Labels are a semantic data-model concept, not storage hints.

  3. C Key/value pairs: unique label set defines each series

    Correct. A time series is uniquely identified by its metric name plus the set of label name/value pairs; each unique combination is a distinct series.

  4. D They encode authorization policy for PromQL queries using label-based access rules enforced at query time

    Incorrect. Prometheus itself does not evaluate authorization policy from labels.

Prometheus Fundamentals

Q4. What does Prometheus TSDB compaction accomplish over time?

Reveal answer and explanations
  1. A It encrypts at-rest blocks using keys rotated from Vault

    Incorrect. Prometheus does not natively encrypt at-rest blocks; encryption is an operational concern handled at the filesystem level.

  2. B It recomputes all quantiles from histogram buckets to reduce storage size as long as the TSDB head block has been flushed and compacted into persistent chunks

    Incorrect. Compaction does not recompute or collapse histogram buckets; bucket series are preserved as-is.

  3. C It merges smaller blocks into larger ones, cutting per-block index overhead, improving range queries, and enabling retention-based deletion

    Correct. Compaction merges adjacent smaller blocks into larger ones, which reduces per-block index overhead, accelerates queries over long ranges, and is where retention deletion actually happens.

  4. D It permanently deletes the WAL regardless of retention settings

    Incorrect. The WAL is truncated as blocks persist, not controlled by compaction retention.

Prometheus Fundamentals

Q5. Which of the following is NOT a core component of the Prometheus server?

Reveal answer and explanations
  1. A Scrape manager (retrieval)

    Incorrect. The scrape manager is a core component responsible for retrieving metrics from targets.

  2. B Time-series database (TSDB) on local disk

    Incorrect. The embedded TSDB stores time-series samples on local disk.

  3. C HTTP server exposing the query API and UI

    Incorrect. The HTTP server exposes `/api/v1/*`, the expression browser, and admin endpoints.

  4. D Notification dispatcher to Slack and PagerDuty

    Correct. Notification delivery is handled by Alertmanager, a separate component — Prometheus only forwards alerts to it.

Drill Prometheus Fundamentals with the full bankDomain Drill mode targets your weak areas — paid feature

How this domain is tested

Prometheus Fundamentals accounts for 20% of the PCA exam. Expect questions that test recall of terminology and the ability to read short scenarios — not deep configuration. Use the sample questions above as difficulty calibration; if any feel hard, the rest of our 34-question domain bank will close those gaps.