Prometheus Certified Associate (PCA) — Questions and Answers
Question 1: Which TSDB concept represents a contiguous on-disk directory containing immutable compressed samples for a fixed time range?
- WAL frame
- Chunk
- Segment
- Block (Correct answer)
Correct answer: Block
A TSDB block is a directory (e.g., 01BX…) holding an index, chunks, and metadata for a specific time range, produced by compaction from the WAL.
Question 2: How can external systems be integrated with Prometheus for alerting?
- By writing custom scripts
- By exporting alerts to CSV
- By using the Alertmanager to send notifications to external systems (Correct answer)
- By storing alerts in external databases
Correct answer: By using the Alertmanager to send notifications to external systems
Prometheus itself generates alerts, but it delegates the responsibility of handling and routing these alerts to the Alertmanager. The Alertmanager acts as a central hub, deduplicating, grouping, and routing alerts to various external notification systems like email, Slack, PagerDuty, or custom webhooks. This separation allows for flexible and robust alert management and integration.
Question 3: What does the `_bucket` suffix on a Histogram metric represent?
- A bucketed summary of quantile values for the histogram
- The raw storage bucket in TSDB where histogram data is written
- A cumulative count of observations that fall at or below each configured upper bound (le label) (Correct answer)
- The total number of histogram bins defined in the instrumentation code
Correct answer: A cumulative count of observations that fall at or below each configured upper bound (le label)
Each _bucket series has an le (less than or equal) label representing an upper bound; its value is the cumulative count of observations at or below that bound.
Question 4: What happens to the WAL when Prometheus shuts down cleanly?
- It is converted into a permanent TSDB block
- It is sent to the remote_write endpoint
- It is deleted to free disk space
- It is checkpointed so replay on restart is faster (Correct answer)
Correct answer: It is checkpointed so replay on restart is faster
On a clean shutdown, Prometheus creates a WAL checkpoint that truncates fully-compacted segments, speeding up the next startup.
Question 5: Which encoding format does Prometheus use by default when sending data via remote_write?
- Avro with gzip compression over gRPC
- JSON over plain HTTP
- Protocol Buffers with Snappy compression over HTTPS (Correct answer)
- MessagePack over WebSockets
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 6: Which Prometheus component resolves, groups, deduplicates, and routes alerts to notification receivers?
- Blackbox Exporter
- Prometheus server rule evaluator
- Pushgateway
- Alertmanager (Correct answer)
Correct answer: Alertmanager
Alertmanager receives alerts from Prometheus, applies grouping and inhibition rules, deduplicates repeats, and routes them to configured receivers like PagerDuty or Slack.
Question 7: What is the key difference between `irate()` and `rate()` in PromQL?
- `irate()` uses only the last two data points while `rate()` averages across the full range (Correct answer)
- `irate()` works on gauges while `rate()` works on counters
- `irate()` returns total increase while `rate()` returns a per-second value
- `irate()` handles resets differently and ignores them entirely
Correct answer: `irate()` uses only the last two data points while `rate()` averages across the full range
`irate()` calculates the instantaneous rate using only the last two samples in the range, making it more responsive to sudden spikes than `rate()`.
Question 8: What content type must a Prometheus metrics endpoint return for the text exposition format?
- application/x-protobuf
- text/plain; version=0.0.4 (Correct answer)
- text/prometheus
- application/json
Correct answer: text/plain; version=0.0.4
The standard Prometheus text format requires the Content-Type header `text/plain; version=0.0.4; charset=utf-8` so scrapers can parse it correctly.
Question 9: Which service discovery mechanism allows Prometheus to discover targets registered in HashiCorp Consul?
- dns_sd_configs
- consul_sd_configs (Correct answer)
- static_configs
- http_sd_configs
Correct answer: consul_sd_configs
consul_sd_configs integrates Prometheus with HashiCorp Consul to dynamically discover services registered there.
Question 10: Which EC2 metadata label exposed by ec2_sd_configs contains the instance's private IP address?
- __meta_ec2_public_dns_name
- __address__
- __meta_ec2_private_ip (Correct answer)
- __meta_ec2_instance_ip
Correct answer: __meta_ec2_private_ip
ec2_sd_configs exposes __meta_ec2_private_ip containing the private IP of each discovered EC2 instance.
Question 11: What is the effect of setting `honor_labels: true` in a Prometheus scrape_config?
- Prometheus ignores all target labels from SD
- Prometheus preserves conflicting labels from the scraped metrics over its own labels (Correct answer)
- Prometheus drops all meta-labels after scraping
- Prometheus trusts TLS certificates without verification
Correct answer: Prometheus preserves conflicting labels from the scraped metrics over its own labels
With `honor_labels: true`, when a scraped metric carries a label that conflicts with a Prometheus-attached label, the scraped value wins and the Prometheus label is renamed.
Question 12: Which exporter exposes metrics from a JMX-enabled Java application?
- jmx_exporter (Correct answer)
- jvm_exporter
- java_exporter
- javaagent_exporter
Correct answer: jmx_exporter
The `jmx_exporter` can run as a Java agent or standalone process, scraping JMX MBeans and exposing them in Prometheus format.
Question 13: What does the `--web.config.file` flag enable in Prometheus?
- Enabling the experimental web UI features
- Loading scrape configs from a remote web URL
- Configuring web proxy settings for scraping
- TLS and basic authentication for the Prometheus HTTP server itself (Correct answer)
Correct answer: TLS and basic authentication for the Prometheus HTTP server itself
The --web.config.file flag loads a YAML file that configures TLS and HTTP Basic Auth for the Prometheus server's own API and UI.
Question 14: What is the purpose of the `__metrics_path__` label in Prometheus service discovery?
- It defines the local filesystem path for metric storage
- It specifies the URL path on the target from which metrics are scraped (Correct answer)
- It names the remote_write endpoint
- It sets the Prometheus rule file path
Correct answer: It specifies the URL path on the target from which metrics are scraped
The __metrics_path__ label overrides the default /metrics path used when scraping a specific target.
Question 15: What is the main advantage of Cortex or Thanos over a standalone Prometheus for production long-term storage?
- They eliminate the need for any exporters by using agent-based metric push
- They provide horizontally scalable, multi-tenant storage with global query capability across instances (Correct answer)
- They automatically generate Grafana dashboards from ingested metric names
- They support additional metric types not available in standard Prometheus
Correct answer: They provide horizontally scalable, multi-tenant storage with global query capability across instances
Cortex and Thanos both decouple storage from individual Prometheus instances, enabling scalable multi-tenant long-term retention and unified querying across many Prometheus servers.
Question 16: What is the role of the `__metrics_path__` label in Prometheus scrape targets?
- Specifies the HTTP path Prometheus requests to collect metrics (Correct answer)
- Defines the retention path for remote write
- Stores the data directory path
- Points to the TLS cert file
Correct answer: Specifies the HTTP path Prometheus requests to collect metrics
`__metrics_path__` overrides the default `/metrics` HTTP path for a specific target, allowing non-standard exposition endpoints.
Question 17: Which Prometheus configuration block defines how targets are discovered dynamically in a Kubernetes cluster?
- recording_rules with pod labels
- scrape_configs with kubernetes_sd_configs (Correct answer)
- alerting_rules with k8s selectors
- remote_write with cluster endpoints
Correct answer: scrape_configs with kubernetes_sd_configs
The scrape_configs block with kubernetes_sd_configs enables Prometheus to dynamically discover targets in a Kubernetes cluster.
Question 18: Which Prometheus internal component evaluates recording and alerting rules at regular intervals?
- WAL (Write-Ahead Log)
- Notifier queue
- Retrieval (scrape loop)
- Rule evaluation engine (Correct answer)
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.
Question 19: In Prometheus recording rules, what is the effect of using `sum without (instance)` in the expression?
- It filters out instances with zero values before summing
- It excludes the instance metric from the sum calculation
- It sums all matching series and drops the instance label from the result, aggregating across all instances (Correct answer)
- It sums only series that do not have an instance label
Correct answer: It sums all matching series and drops the instance label from the result, aggregating across all instances
sum without (instance) aggregates series together by removing the instance dimension, producing per-job or per-cluster totals.
Question 20: Which Prometheus component is responsible for discovering and maintaining the list of scrape targets?
- Pushgateway
- Alertmanager
- Remote write adapter
- Service discovery / relabeling pipeline (Correct answer)
Correct answer: Service discovery / relabeling pipeline
Prometheus uses service discovery mechanisms (e.g., file_sd, kubernetes_sd) combined with the relabeling pipeline to discover and configure scrape targets.
Question 21: What is the primary difference between a Counter and a Gauge metric type in Prometheus?
- Counters only increase (or reset to zero); Gauges can go up or down (Correct answer)
- Counters can decrease; Gauges can only increase
- Gauges are cumulative histograms; Counters are summaries
- Counters use floating-point; Gauges use integers
Correct 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).
Question 22: How does Prometheus alerting work?
- By notifying users when thresholds are met (Correct answer)
- By storing alerts in a separate system
- By generating logs
- By collecting data
Correct answer: By notifying users when thresholds are met
Prometheus alerting uses alert rules defined in PromQL to notify users when certain conditions are met, such as system performance thresholds being exceeded.
Question 23: What does the `up` metric that Prometheus automatically generates represent?
- The uptime in seconds of the Prometheus server
- Whether a scrape target was successfully reached (1) or failed (0) (Correct answer)
- Whether a Prometheus rule evaluation succeeded
- Whether alertmanager is reachable from Prometheus
Correct answer: Whether a scrape target was successfully reached (1) or failed (0)
Prometheus automatically generates an `up` metric (value 1 for success, 0 for failure) for each scrape target to indicate scrape health.
Question 24: What is the purpose of `ca_file` in a Prometheus tls_config block?
- It specifies the CA certificate used to verify the target's TLS certificate (Correct answer)
- It names the Kubernetes secret containing TLS credentials
- It defines the certificate authority for Prometheus's own HTTPS server
- It lists the cipher algorithms allowed during scraping
Correct answer: It specifies the CA certificate used to verify the target's TLS certificate
ca_file provides the CA bundle that Prometheus uses to validate the server certificate presented by scrape targets.
Question 25: What does the Prometheus Pushgateway allow you to do?
- Push TSDB blocks to remote object storage
- Push alert notifications from Prometheus to Alertmanager
- Push configuration changes to Prometheus without a restart
- Push metrics from short-lived jobs to an intermediary that Prometheus can scrape (Correct answer)
Correct answer: Push metrics from short-lived jobs to an intermediary that Prometheus can scrape
The Pushgateway accepts metrics pushed from batch jobs or crons that exit before Prometheus can scrape them, holding the last pushed value until overwritten.
Question 26: What is the purpose of labels in Prometheus metrics?
- To track changes over time
- To classify metrics into categories
- To store timestamps
- To provide additional context for metrics (Correct answer)
Correct answer: To provide additional context for metrics
A counter is a specific type of metric in Prometheus that tracks values over time, with the unique characteristic that its value only ever increases or resets to zero upon a restart. It is primarily used for counting occurrences of events, such as the number of HTTP requests received or errors encountered. This allows for calculating rates of change and understanding cumulative totals over the lifetime of a process.
Question 27: How can recording rules help reduce the load on Prometheus during Grafana dashboard queries?
- Recording rules cache dashboard queries in memory for 5 minutes
- Pre-computed results are stored as simple time series so dashboards query low-cost instant vectors instead of expensive range computations (Correct answer)
- Recording rules compress metric output by 90% before sending to Grafana
- They move query computation to Alertmanager to offload the Prometheus engine
Correct answer: Pre-computed results are stored as simple time series so dashboards query low-cost instant vectors instead of expensive range computations
Dashboards that query pre-computed recording rule metrics avoid running expensive PromQL aggregations on every refresh, reducing CPU load significantly.
Question 28: What is the significance of the `__name__` label in Prometheus?
- It contains the job name from the scrape configuration
- It holds the metric name and can be used in label matchers (Correct answer)
- It is a reserved label only visible in federation responses
- It stores the target's hostname for identification
Correct answer: It holds the metric name and can be used in label matchers
__name__ is the internal label that stores the metric name, and it can be used in label matchers or relabeling rules to reference or rename metrics.
Question 29: Which exporter is the standard choice for exposing Linux host-level metrics such as CPU, memory, and disk?
- blackbox_exporter
- process_exporter
- node_exporter (Correct answer)
- host_exporter
Correct answer: node_exporter
The `node_exporter` exposes a comprehensive set of hardware and OS metrics from Linux/Unix hosts via `/proc` and `/sys`.
Question 30: What is the OpenMetrics format and how does it relate to Prometheus exposition format?
- OpenMetrics is a standardized evolution of Prometheus exposition format with additional features, published as an IETF standard (Correct answer)
- OpenMetrics is a Grafana Labs format that extends Prometheus with trace correlation
- OpenMetrics replaces Prometheus internally but is not exposed over HTTP
- OpenMetrics is a competing standard unrelated to Prometheus that uses JSON encoding
Correct answer: OpenMetrics is a standardized evolution of Prometheus exposition format with additional features, published as an IETF standard
OpenMetrics is a standardized specification based on the Prometheus text format, adding features like exemplars and becoming an IETF Internet Standard.
Question 31: What is a Prometheus 'block' on disk?
- A single scrape result file per target
- A WAL segment written every 15 seconds
- A JSON export of all active time series
- An immutable directory containing chunks, an index, and metadata for a fixed time range (Correct answer)
Correct answer: An immutable directory containing chunks, an index, and metadata for a fixed time range
A TSDB block is an immutable directory holding compressed chunk files, an inverted index, and a meta.json describing its time range.
Question 32: Which HTTP path does a Prometheus-native instrumented application typically expose its metrics on?
- /prometheus
- /metrics (Correct answer)
- /stats
- /telemetry
Correct answer: /metrics
By convention, Prometheus-instrumented applications serve metrics at the `/metrics` HTTP path in the Prometheus text exposition format.
Question 33: Which Prometheus configuration block allows per-target scrape parameter overrides such as custom query params?
- target_params
- query_params
- params (Correct answer)
- scrape_params
Correct answer: params
The `params` map in a scrape_config appends arbitrary HTTP query parameters to every scrape request, commonly used with multi-target exporters.
Question 34: What is a common challenge in troubleshooting with Prometheus?
- Writing scripts
- Storing alerts
- Tracking tenant behavior
- Managing large volumes of data and efficient queries (Correct answer)
Correct answer: Managing large volumes of data and efficient queries
As systems scale, Prometheus can collect vast amounts of metric data, making it challenging to store, query, and analyze efficiently. Crafting optimized PromQL queries that perform well across large datasets requires skill, and inefficient queries can strain the Prometheus server. Effective data retention policies and query optimization are essential for successful troubleshooting in such environments.
Question 35: What is the role of a Prometheus exporter?
- It exports Prometheus TSDB blocks to an external backup system
- It translates metrics from a third-party system into the Prometheus exposition format and exposes them on an HTTP endpoint (Correct answer)
- It forwards Prometheus alerts to external notification channels
- It converts Prometheus metrics to Grafana JSON format
Correct answer: It translates metrics from a third-party system into the Prometheus exposition format and exposes them on an HTTP endpoint
An exporter is a bridge that reads metrics from a system that doesn't natively support Prometheus and exposes them in Prometheus text format for scraping.
Question 36: In cross-service federation, which metrics are typically federated up to a global Prometheus server?
- Pre-aggregated or recording-rule-generated metrics relevant at the global level (Correct answer)
- Every raw metric from every service target
- Metrics that have been flagged by Alertmanager as critical
- Only metrics whose names start with a specific prefix
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 37: An Alertmanager route has `group_wait: 30s` and `group_interval: 5m`. A second alert fires in the same group 10 seconds after the first. When will the second alert be sent?
- Immediately, because it is a new alert
- After the 5m group_interval elapses from the first notification
- After its own 30s group_wait starts independently
- Together with the first alert after the 30s group_wait expires (Correct answer)
Correct answer: Together with the first alert after the 30s group_wait expires
Alerts in the same group are batched together; the second alert joins the existing group and is sent when the group_wait of 30s expires.
Question 38: What is the significance of the `_bucket`, `_sum`, and `_count` suffixes automatically created for a Prometheus Histogram?
- They are optional metadata fields for histogram configuration
- They represent minimum, average, and maximum values respectively
- They are the three separate time series Prometheus stores for every histogram metric (Correct answer)
- They are required labels for histogram queries only
Correct answer: They are the three separate time series Prometheus stores for every histogram metric
Prometheus automatically creates three time series for each histogram: `_bucket` (cumulative counts per bucket), `_sum` (total sum of observations), and `_count` (total number of observations).
Question 39: In Prometheus file-based service discovery, what file formats are supported?
- JSON and YAML (Correct answer)
- CSV and JSON
- YAML only
- JSON only
Correct answer: JSON and YAML
Prometheus `file_sd_config` accepts target group files written in either JSON or YAML format.
Question 40: An inhibition rule in Alertmanager has `source_match: {severity: 'critical'}` and `target_match: {severity: 'warning'}`. What happens when a critical alert fires?
- Both critical and warning alerts are routed to the same receiver
- Warning alerts are promoted to critical
- The critical alert is silenced automatically
- Warning alerts matching the target are suppressed (Correct answer)
Correct answer: Warning alerts matching the target are suppressed
Inhibition rules suppress (mute) target alerts when a matching source alert is firing, reducing redundant notifications.
Question 41: In Prometheus, what does the `le` label represent in a histogram metric?
- Less than or equal to bucket boundary (Correct answer)
- Log exponent
- Label encoding
- Label expression
Correct answer: Less than or equal to bucket boundary
The `le` label in histograms denotes the upper inclusive bound ('less than or equal to') for each bucket.
Question 42: When visualizing metrics in Grafana, what does 'legend format' allow you to customize?
- The display name of each series in the legend using label values (Correct answer)
- The tooltip content shown on hover
- The Y-axis unit and scale for the panel
- The color and line style of each time series
Correct answer: The display name of each series in the legend using label values
Legend format lets you define a template using label names (e.g., `{{instance}} - {{job}}`) to create meaningful legend labels for each time series.
Question 43: In Prometheus, what is the effect of setting `honor_labels: true` on a scrape configuration?
- Prometheus-assigned labels always override target labels
- Labels are deduplicated by keeping only unique values
- Prometheus ignores all labels from the target
- Conflicting labels from the target override Prometheus-assigned labels (Correct answer)
Correct answer: Conflicting labels from the target override Prometheus-assigned labels
With honor_labels: true, if the target exposes a label that conflicts with a Prometheus-set label, the target's label wins.
Question 44: What file format do Prometheus TSDB chunk files use?
- Apache Parquet
- Apache Arrow
- A custom binary format optimized for time-series compression (Correct answer)
- Protocol Buffers
Correct answer: A custom binary format optimized for time-series compression
Prometheus TSDB uses a custom binary chunk format with delta-of-delta and XOR compression for timestamps and values.
Question 45: Which HTTP endpoint must be exposed on a Prometheus server for another Prometheus to federate from it?
- /federate (Correct answer)
- /api/v1/targets
- /api/v1/query
- /metrics
Correct answer: /federate
The /federate endpoint is specifically designed to allow other Prometheus servers to scrape selected time series from it.
Question 46: What are 'exemplars' in Prometheus and how do they relate to remote storage?
- Trace ID references attached to metric observations that can be forwarded via remote_write (Correct answer)
- Special metric types used to track 99th-percentile latency without histograms
- Configuration examples embedded in the prometheus.yml for documentation
- Pre-computed aggregation values stored alongside raw histograms
Correct answer: Trace ID references attached to metric observations that can be forwarded via remote_write
Exemplars are optional references to distributed trace IDs stored alongside histogram or summary observations; they can be forwarded through remote_write to link metrics with traces in a compatible backend.
Question 47: What is the purpose of a Prometheus `Collector` interface in client libraries?
- It defines the collection interval for metrics that require polling
- It batches scrape results before sending them to the Prometheus server
- It allows custom metric sources to register and describe their metrics dynamically rather than declaring them statically (Correct answer)
- It collects all registered metrics and writes them to the /metrics endpoint atomically
Correct answer: It allows custom metric sources to register and describe their metrics dynamically rather than declaring them statically
The Collector interface lets you implement custom metric collection logic where metric descriptors and values are generated dynamically at scrape time.
Question 48: What is a potential security concern with Prometheus's `/api/v1/admin/tsdb/delete_series` endpoint?
- It allows any unauthenticated caller to permanently delete metric data if the admin API is not protected (Correct answer)
- It triggers immediate compaction, causing a denial of service
- It requires direct disk access and bypasses WAL checksums
- It is enabled by default and deletes data older than 15 days automatically
Correct answer: It allows any unauthenticated caller to permanently delete metric data if the admin API is not protected
The admin API delete endpoint can irreversibly remove series data, so it must be protected by auth or network controls since Prometheus has no built-in access control by default.
Question 49: What label does the Pushgateway automatically add to all metrics to identify the originating job?
- pushed_by
- instance
- job (Correct answer)
- source
Correct answer: job
The Pushgateway uses the job name from the push URL path (`/metrics/job/<jobname>`) as the `job` label on all stored metrics.
Question 50: What is a Prometheus 'target' in the context of its architecture?
- An alert that has been triggered
- An HTTP endpoint Prometheus scrapes for metrics (Correct answer)
- A Grafana dashboard panel
- A recording rule output
Correct answer: An HTTP endpoint Prometheus scrapes for metrics
A target is an HTTP endpoint (typically /metrics) that Prometheus polls at each scrape interval to collect time-series samples.
Question 51: What is a key drawback of using the Prometheus Pushgateway for all metrics?
- It cannot hold more than 100 series
- It does not support labels
- Metrics persist after the originating job ends, hiding job failures (Correct answer)
- It requires a separate TLS certificate per job
Correct answer: Metrics persist after the originating job ends, hiding job failures
Pushed metrics remain in the Pushgateway until explicitly deleted, so a failed or stale job may still appear healthy because its last metrics are still present.
Question 52: What does the `labelmap` action in relabel_configs do?
- Copies all labels matching a regex into new labels with transformed names (Correct answer)
- Removes all labels from a target
- Maps label values to integer codes
- Converts label names to uppercase
Correct answer: Copies all labels matching a regex into new labels with transformed names
labelmap matches existing label names against a regex and creates new labels with names derived from the match groups.
Question 53: A Prometheus alert has been in the `PENDING` state for longer than the configured `for` duration but has not transitioned to `FIRING`. What is the most likely cause?
- The alert condition became false before the for-duration elapsed (Correct answer)
- The rule evaluation interval is longer than the for-duration
- The alerting rule file has a syntax error
- Alertmanager is not reachable
Correct answer: The alert condition became false before the for-duration elapsed
If the alert condition resolves before the for-duration completes, the alert resets to inactive without ever firing.
Question 54: When troubleshooting a failing alerting rule, which Prometheus API endpoint provides the current evaluation state and any errors for alerting rules?
- /api/v1/rules (Correct answer)
- /api/v1/alerts
- /api/v1/targets
- /api/v1/query
Correct answer: /api/v1/rules
/api/v1/rules returns all loaded alerting and recording rules along with their current state, last evaluation time, and any evaluation errors.
Question 55: What HTTP method should a batch job use to delete its metrics from the Pushgateway after completion?
- PUT /metrics/job/<name>/clear
- POST /delete/job/<name>
- DELETE /metrics/job/<name> (Correct answer)
- GET /metrics/job/<name>
Correct answer: DELETE /metrics/job/<name>
Sending an HTTP DELETE to `/metrics/job/<jobname>` removes the metric group from the Pushgateway, preventing stale data from persisting.
Question 56: Which Prometheus client library method is used to push metrics to a Pushgateway in the Go client?
- pushgateway.Send()
- prometheus.Push()
- push.Collectors().Add()
- push.New().Push() (Correct answer)
Correct answer: push.New().Push()
The Go client's `push.New(url, job).Collector(c).Push()` chain sends a collector's metrics to the specified Pushgateway URL under the given job name.
Question 57: What is the role of labels in troubleshooting Prometheus metrics?
- To monitor configuration files
- To identify alert triggers
- To group and filter metrics for troubleshooting (Correct answer)
- To define data retention
Correct answer: To group and filter metrics for troubleshooting
Labels are key-value pairs attached to Prometheus metrics, providing rich dimensionality. They allow users to group related metrics, filter data based on specific criteria (e.g., by instance, service, or environment), and drill down into issues during troubleshooting. This granular categorization is crucial for efficiently identifying the root cause of problems within complex systems.
Question 58: A developer adds a label called `__internal__` to a metric. What will Prometheus do with it?
- Store it as a normal label
- Convert it to a metadata annotation
- Drop the label because labels beginning with `__` are reserved (Correct answer)
- Reject the entire scrape
Correct answer: Drop the label because labels beginning with `__` are reserved
Labels with names beginning with double underscores (`__`) are reserved for Prometheus internal use and are dropped from user-facing metrics.
Question 59: What is the purpose of the `scrape_timeout` setting in a Prometheus scrape configuration?
- Maximum duration allowed for a single scrape request before it is aborted (Correct answer)
- Maximum time to wait for a target to appear in service discovery
- Maximum time between consecutive scrapes of a target
- Maximum time Prometheus waits before retrying a failed scrape
Correct answer: Maximum duration allowed for a single scrape request before it is aborted
scrape_timeout defines how long Prometheus will wait for a target's HTTP response before canceling the scrape and marking it as a failure.
Question 60: What is the purpose of the remote_read configuration in Prometheus?
- Fetching service discovery target lists from a remote endpoint
- Importing recording rules from a remote Prometheus instance
- Receiving metrics pushed from remote exporters via HTTP
- Querying historical metric data from a remote storage system to satisfy PromQL queries (Correct answer)
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.
Question 61: What result type does the expression `http_requests_total[5m]` produce?
- String
- Instant vector
- Range vector (Correct answer)
- Scalar
Correct answer: Range vector
Using a duration in square brackets creates a range vector, which contains a set of time series with a range of data points over the specified time window.
Prometheus Certified Associate (PCA)
The PCA certifies foundational knowledge of Prometheus monitoring and observability, covering PromQL, Prometheus architecture, instrumentation, exporters, and alerting. It is offered by the Linux Foundation and CNCF.
Exam Rules
- You can skip questions and return to them later
- Flag questions for review before submitting
- No feedback shown until you submit the entire exam
- Unanswered questions count as wrong — answer everything
- 10 pretest questions are mixed in and don't affect your score
- Timer auto-submits when time runs out
- Your progress is auto-saved every 30 seconds