Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free Linux Foundation Prometheus Certified Associate PCA Exam Questions

Last updated: · 15 practice questions with answers and explanations

Page: 1 / 6 Total 60 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Observability Concepts

Skill tested: Selects metrics, logs, and traces based on the operational question each can answer.

A payment service has intermittent latency spikes affecting only a small fraction of requests. The team currently records request totals and average latency, but the averages hide the affected requests. It must retain low-cardinality time-series data for SLO reporting, while engineers need to inspect the path and detailed events of an individual slow request. The application can add instrumentation, but the metrics backend should not receive request IDs or other per-request labels. Which approach best meets these requirements?

Correct Answer: A. Record latency distributions as metrics for aggregate SLO analysis, and use tracing with request-level context to investigate individual slow requests.
Explanation:

Latency metrics, particularly distributions such as histograms, support efficient aggregate analysis and SLO calculations. Traces preserve request-level context and spans, making them useful for following an individual slow request across operations. Adding request IDs as metric labels creates high-cardinality series and is unsuitable for Prometheus. Storing every event as a metric misuses the time-series model, while traces alone are generally not the preferred compact source for long-term aggregate service-level measurements.

Question 2

New Multiple answers

Topic: Observability Concepts

Skill tested: Distinguishes Prometheus pull and push collection patterns and their operational trade-offs.

A platform team monitors long-running services in a Kubernetes environment and short-lived batch jobs that may finish before the next Prometheus scrape. Prometheus has network access to the services' metrics endpoints. The team wants the services to follow the normal scrape model and needs a practical way to retain completion metrics from jobs that terminate quickly. Select TWO actions that best satisfy these requirements. Select 2 answers.

Correct Answer: D. Configure Prometheus to scrape the long-running services' exposed HTTP metrics endpoints.; E. Send the short-lived jobs' final metrics to a Pushgateway, and configure Prometheus to scrape that gateway.
Explanation:

Prometheus normally pulls metrics by scraping targets, so scraping the long-running services is the appropriate design. A short-lived batch process may exit before a scrape; it can publish its final metrics to a Pushgateway, which Prometheus then scrapes. The Pushgateway is not a replacement time-series database, nor does its use change Prometheus into a direct-push monitoring system. High-cardinality run identifiers can cause unbounded series growth and are not a suitable way to retain every execution indefinitely.

Question 3

New Single answer

Topic: Observability Concepts

Skill tested: Applies basic service discovery to maintain scrape targets as infrastructure changes.

A monitoring team manages a fleet of virtual machines whose addresses change as instances are replaced. The Prometheus configuration currently lists each address under a static scrape target, creating missed scrapes after deployments. The fleet's infrastructure provider exposes an API containing current instances and their metadata. The team wants Prometheus to discover current targets automatically and preserve a stable service label, without introducing a separate configuration-generation process. What is the best approach?

Correct Answer: A. Configure the appropriate Prometheus service-discovery mechanism for the infrastructure provider and use relabeling to retain stable service metadata.
Explanation:

Prometheus service discovery can query supported infrastructure APIs and update target sets as instances change. Relabeling can use discovered metadata to keep useful, stable labels and filter or shape targets before scraping. Static configuration does not learn changed addresses merely because the scrape interval is longer. The Pushgateway is intended for metrics from short-lived jobs, not target discovery; external labels identify a Prometheus server or its data externally and do not discover targets.

Question 4

New Single answer

Topic: Observability Concepts

Skill tested: Calculates an SLI and evaluates it against an SLO over a defined measurement window.

An API team defines successful availability as the fraction of eligible requests that return a non-error response. Its service-level objective is at least 99.9% over a rolling 30-day window. A dashboard currently displays the monthly request count and a separate count of errors, but does not show whether the objective is being met. The team needs a user-facing indicator that directly represents the stated objective rather than a contractual commitment. Which measurement should it publish?

Correct Answer: C. The percentage of eligible requests that succeeded during the rolling 30-day window, compared with the 99.9% target.
Explanation:

The success fraction is the service-level indicator (SLI) because it measures the chosen aspect of service behavior. Comparing that measured value with 99.9% over the stated rolling window determines whether the service-level objective (SLO) is met. A request count alone is not an availability ratio, and response latency measures a different aspect of service quality. An SLA is a commitment or agreement, not a measurement inferred from replica count.

Question 5

New Single answer

Topic: Prometheus Fundamentals

Skill tested: Configures a scrape job with valid target and scrape interval settings.

A team deploys a service that exposes Prometheus-format metrics at `/metrics` on port 9400. Prometheus can reach the service at `checkout.internal.example`, and the operators want a dedicated job name and a 30-second scrape interval. The service is not managed by a discovery integration, so a direct target is appropriate. Which configuration fragment correctly defines the scrape job?

Correct Answer: D. `scrape_configs: - job_name: checkout; scrape_interval: 30s; static_configs: - targets: ['checkout.internal.example:9400']`
Explanation:

A Prometheus scrape target is specified as a host and port; the default metrics path is `/metrics`. The interval uses a duration such as `30s`, and `job_name` identifies the scrape job. The target field is not an HTTP URL, so embedding a scheme or path there is incorrect. `evaluation_interval` controls rule evaluation rather than how often targets are scraped, and the target in D improperly puts the path into the address.

Question 6

New Multiple answers

Topic: Prometheus Fundamentals

Skill tested: Traces a scraped sample through target labeling and Prometheus time-series identity.

An operations group is debugging why two services produce unexpectedly separate series in Prometheus. The `api` scrape job discovers two endpoints, and both expose `http_requests_total` with the same `method` and `code` labels. Prometheus adds target labels during scraping. The team needs to explain the data model accurately and choose which identifying labels to inspect, not change application instrumentation. Select TWO statements that correctly describe the scraped series. Select 2 answers.

Correct Answer: B. The `job` and `instance` labels can distinguish the scraped targets and therefore the series.; E. The metric name together with its complete label set identifies a time series.
Explanation:

A Prometheus time series is identified by its metric name and complete set of labels. Scrape-generated labels such as `job` and `instance` normally distinguish targets, so the two endpoints produce separate series even when their application labels match. Timestamps identify individual samples within a series; they do not create a new series each scrape. Prometheus does not discard target labels by default, although relabeling or metric relabeling can alter labels.

Question 7

New Single answer

Topic: Prometheus Fundamentals

Skill tested: Evaluates cardinality and retention constraints when scaling Prometheus metrics.

A service team proposes adding a `user_id` label to a request counter because analysts want to filter dashboards for individual users. The service processes millions of distinct users, and Prometheus already stores several months of operational metrics on a constrained monitoring cluster. The team still needs aggregate request counts by route and response class. Which recommendation best preserves useful analysis while controlling Prometheus resource use?

Correct Answer: A. Remove `user_id` from metric labels and retain bounded dimensions such as route and response class; use an appropriate event store for per-user analysis.
Explanation:

Every distinct label combination creates a separate time series, so a high-cardinality `user_id` label can greatly increase memory, storage, and query costs. Counters are subject to the same series cardinality as other metric types, and changing the scrape interval does not reduce the number of distinct label combinations. Increasing retention stores the expensive series for longer rather than merging them. Bounded dimensions support the required aggregates, while per-user event analysis belongs in a system designed for that purpose.

Question 8

New Single answer

Topic: PromQL

Skill tested: Uses rate before aggregation to calculate request throughput across instances.

A service is instrumented with `http_requests_total`, a counter labeled by `job`, `instance`, and `status`. An engineer needs one time series showing the per-second request rate for each status across all instances of the `checkout` job, using a five-minute window. Counter resets must be handled correctly, and the resulting output must retain only `status` as its grouping label. Which PromQL expression meets the requirements?

Correct Answer: D. `sum by (status) (rate(http_requests_total{job="checkout"}[5m]))`
Explanation:

`rate()` calculates a per-second average rate over the range and accounts for counter resets on each original series. Applying it before aggregation preserves each instance's reset information; `sum by (status)` then combines instances while retaining only `status`. Aggregating the counter before applying a rate can hide individual resets, and grouping by `instance` does not produce the requested status totals. `increase()` yields an estimated count over the window, not a per-second rate.

Question 9

New Multiple answers

Topic: PromQL

Skill tested: Combines vector matching and arithmetic to calculate a ratio by a shared label.

A dashboard must show the fraction of requests that returned 5xx responses, broken down by `service`. The numerator metric `http_requests_total` includes `service`, `code`, and `instance`; the denominator has the same metric and labels. The query should use a five-minute per-second rate, return one ratio series per service, and avoid division by zero producing misleading values. Select TWO PromQL expressions that meet the requirements. Select 2 answers.

Correct Answer: B. `sum by (service) (rate(http_requests_total{code=~"5.."}[5m])) / sum by (service) (rate(http_requests_total[5m])) unless sum by (service) (rate(http_requests_total[5m])) == 0`; D. `sum by (service) (rate(http_requests_total{code=~"5.."}[5m])) / sum by (service) (rate(http_requests_total[5m]))`
Explanation:

Both expressions aggregate numerator and denominator to the same `service` label set, so vector matching pairs each service's 5xx rate with its total rate. Expression E additionally filters out services whose denominator is zero, avoiding a zero-denominator result. Expression B leaves the denominator grouped by `code`, so its label set does not provide a single total per service. C's explicit matching cannot repair the incorrect semantic aggregation in this construction, and D groups the numerator by the wrong dimension.

Question 10

New Single answer

Topic: PromQL

Skill tested: Calculates an average histogram observation using bucket and count rates.

A team exposes a classic Prometheus histogram named `rpc_duration_seconds`, including `_sum`, `_count`, and cumulative `_bucket` series. An engineer wants the mean observed duration per `service`, averaged over five minutes. The query must be robust to counter resets and must not mistakenly average bucket boundaries. Which expression should the engineer use?

Correct Answer: C. `sum by (service) (rate(rpc_duration_seconds_sum[5m])) / sum by (service) (rate(rpc_duration_seconds_count[5m]))`
Explanation:

For a classic histogram, the mean over a time window is the rate of the cumulative observation sum divided by the rate of the cumulative observation count. Applying `rate()` to each counter before aggregation also handles resets correctly. Bucket series represent cumulative counts at bucket boundaries; averaging their rates does not calculate a mean duration. Dividing the raw cumulative sum and count yields a lifetime mean rather than a five-minute mean, and `histogram_quantile()` requires bucket data, not `_sum`.

Question 11

New Single answer

Topic: PromQL

Skill tested: Uses range-vector functions to detect increases in a gauge over a time window.

A storage controller exports `queue_depth` as a gauge for each `cluster` and `queue`. A dashboard should show, for each queue, how much its observed depth has increased across the last 15 minutes, comparing the earliest and latest samples in that range. The metric is not a counter, so counter-rate functions are inappropriate. Which expression is the most direct fit?

Correct Answer: D. `delta(queue_depth[15m])`
Explanation:

`delta()` calculates the difference between the first and last values in a range vector, which directly matches the requested change in a gauge over 15 minutes. `increase()` and `rate()` are intended for counters and handle resets, which is not appropriate for this gauge. `changes()` counts how many times the value changed; it does not measure the magnitude of the increase.

Question 12

New Single answer

Topic: Instrumentation and Exporters

Skill tested: Selects an appropriate client library and instrumentation model for application metrics.

A Go-based order service needs to expose request totals and latency measurements in Prometheus format. It runs as a long-lived process and can add native instrumentation, and the engineering team wants metrics to appear on a scrape endpoint without maintaining a custom text formatter. The service also needs bounded labels for route and response class. Which implementation is most appropriate?

Correct Answer: C. Use a Prometheus client library for Go to instrument the service and expose its registry through an HTTP metrics handler.
Explanation:

A language client library is designed to instrument application code, maintain metric state, and expose metrics for Prometheus to scrape. The Go client library and an HTTP metrics handler provide this standard integration; bounded route and response-class labels can support useful aggregation. Node Exporter exposes host-level system metrics, not application request instrumentation. Prometheus does not scrape arbitrary local files directly, and per-request pushing with user IDs conflicts with the pull model and creates high cardinality.

Question 13

New Multiple answers

Topic: Instrumentation and Exporters

Skill tested: Matches host, database, and black-box monitoring needs to suitable exporters.

A small operations team must monitor three systems: Linux host CPU, memory, and filesystem metrics; a database that cannot be modified to expose Prometheus metrics but has a supported exporter; and external HTTP endpoint availability, including response-time checks. The team can deploy exporters and configure Prometheus scrapes, but it must not confuse application instrumentation with host monitoring. Select THREE appropriate choices. Select 3 answers.

Correct Answer: B. Deploy the database's supported exporter and configure Prometheus to scrape its metrics endpoint.; C. Use Blackbox Exporter probes for the external HTTP endpoints and scrape the probe results.; E. Deploy Node Exporter on the Linux hosts to expose operating-system metrics for Prometheus to scrape.
Explanation:

Node Exporter is intended for host-level system metrics, while a database-specific exporter translates database state into Prometheus metrics when direct instrumentation is unavailable. Blackbox Exporter performs probes such as HTTP checks and exposes probe results for Prometheus to scrape. Node Exporter does not query database tables, and instrumenting Prometheus itself does not provide external endpoint probing. The stated separation of responsibilities selects A, B, and C.

Question 14

New Single answer

Topic: Alerting & Dashboarding

Skill tested: Configures alert-rule duration and uses Alertmanager for notification routing.

A platform team wants an alert when a service's 5xx request rate exceeds a threshold continuously for ten minutes. The team wants brief spikes to appear in dashboards without paging, while sustained breaches should be sent to the on-call receiver through Alertmanager. The Prometheus server already evaluates rule files and can reach Alertmanager. Which design best meets the requirement?

Correct Answer: C. Create a Prometheus alerting rule for the rate condition with a `for: 10m` duration, then configure Alertmanager to route the firing alert to the on-call receiver.
Explanation:

Prometheus alerting rules evaluate expressions and can use `for` to require a condition to remain active before the alert becomes firing. Alertmanager then handles grouping, routing, inhibition, and notification delivery. A recording rule stores an expression result but does not itself represent the required alert duration, and Alertmanager does not scrape targets or evaluate PromQL. Dashboard annotations visualize information but do not replace an alerting pipeline.

Question 15

New Multiple answers

Topic: Alerting & Dashboarding

Skill tested: Separates diagnostic dashboards from actionable alerts and avoids noisy high-cardinality alert labels.

A service owner receives repeated pages for brief latency spikes, while the operations dashboard cannot show which service is approaching its latency objective. The team wants actionable notifications for sustained user-impacting conditions and dashboard detail for diagnosis. Alertmanager already groups alerts by service, and the alert rule currently includes `instance` as a label. Select TWO improvements that best address the problem. Select 2 answers.

Correct Answer: A. Build a dashboard panel showing latency by service and use it to inspect behavior that does not warrant a page.; C. Alert on a sustained, SLO-relevant latency condition and use a duration requirement to avoid paging on brief spikes.
Explanation:

A sustained condition tied to user impact or an SLO is more actionable than a page for every transient spike; a `for` duration can suppress brief excursions. A dashboard should provide diagnostic context and trends for signals that do not require immediate notification. Alerting on every sample increases noise, and unique request identifiers create excessive alert-label cardinality and defeat useful grouping. Dashboards do not automatically replace alert rules or notification routing.