Exam Information
Free practice questions with explanations
Linux Foundation PCA Practice Questions
Answer a question to see the correct answer and the explanation, or click Show answer. Newest questions first.
- Questions
- 15
- Answered
- 0
- Correct
- 0
- Score
- -
-
1 Question 1 Single choice Instrumentation and Exporters
A team is writing a custom exporter for a legacy inventory system that exposes a single HTTP endpoint returning a JSON document with per-warehouse stock counts. The data is refreshed every 15 minutes, and the warehouse list changes occasionally. The team wants the exporter to be correct under Prometheus scraping and to avoid stale values being reported as current. The exporter must also expose a failure signal when the upstream endpoint is unreachable. What is the best design?
Correct Answer: BExplanationFetching on each scrape keeps the exposed values as current as the source, a gauge with a warehouse label represents a stock level that can rise and fall, and an explicit success gauge lets alerts detect an unreachable upstream rather than silently reporting stale data. Caching forever hides both staleness and failure. Turning stock levels into counters that the exporter increments invents a meaning the source does not provide and breaks under decreases. Writing a file has no failure signal and the textfile collector only exposes whatever the file last contained, so outages go unnoticed.
-
2 Question 2 Single choice Observability Concepts
A reliability engineer wants to define an error budget for a checkout API. The product owner states a 99.9 percent monthly availability objective and a contractual SLA of 99.5 percent for enterprise customers. The engineer needs to ensure that alerts fire before the contractual breach, and that the SLO is measured from user-facing request outcomes rather than infrastructure health. Which pair of decisions best satisfies these requirements?
Correct Answer: AExplanationThe SLO should be stricter than the contractual SLA so that internal alerts give time to respond, and it should be measured from user-facing request outcomes, which is the ratio of successful to total requests. Option B reverses the relationship, so the public commitment is stricter than the internal target. Using the up metric measures target reachability rather than user experience, and alerting only after the SLA breach gives no warning. CPU utilisation is a resource signal rather than an availability indicator, so it cannot represent the objective.
-
3 Question 3 Single choice PromQL
A team needs to compare the 5 minute request rate of a service in the current hour against the same hour one week earlier to detect regressions. They have a counter http_requests_total with labels job and code. Their first attempt uses rate(http_requests_total[5m]) offset 1w but the comparison shows nothing matching on the labels because the series from the two times do not join. The team wants a single query that returns the ratio of current rate to the rate one week ago, per job and code, and that is valid as a PromQL expression. Which query is correct?
Correct Answer: AExplanationThe offset modifier must attach to the selector, so rate(http_requests_total[5m] offset 1w) correctly reads the historical window, and a binary division between two instant vectors matches on the full label set including job and code, returning a per-label ratio. Option B applies offset to the whole division and so compares the current value with a shifted value in the wrong place. Option C uses on() with an empty label list, which collapses the matching and discards the per-job and per-code breakdown. Option D shifts the numerator as well, so the ratio compares two historical values and never reflects the current state.
-
4 Question 4 Single choice Prometheus Fundamentals
A monitoring engineer is troubleshooting a scrape job that reports samples for a target with a sudden jump in series count. The target exposes its metrics in the Prometheus text exposition format. The engineer discovers that one histogram metric has a series named request_latency_seconds_bucket with le values such as 0.1, 0.5, 1, and 5, but there is no series for the +Inf bucket, and the _count and _sum series are present. Histogram quantile queries return NaN. What is the most likely cause, and what should the team do?
Correct Answer: AExplanationA classic histogram in the exposition format must include a le="+Inf" bucket whose value equals the _count series, and histogram_quantile needs that upper bound to interpolate the highest percentiles, so the missing bucket causes NaN results. Prometheus does not drop buckets based on their le value, so raising scrape limits does not address the gap. Summary quantiles are a different metric type and would require changing the instrumentation rather than the query. Renaming _sum to _total does not create buckets and would break the histogram structure further.
-
5 Question 5 Single choice PromQL
A reliability team wants to identify which pods had their restart counter increase in the last hour, and to show how long ago each pod last restarted. The metric kube_pod_container_status_restarts_total is a counter per container. They also have access to kube_pod_start_time, a gauge holding the Unix timestamp at which each pod started. A teammate proposes using time() minus kube_pod_start_time to estimate the restart time, but the team realises that pod start time is not the same as the most recent restart. They need a query that returns the Unix timestamp of the last time each container's restart count changed. Which PromQL expression should they use?
Correct Answer: DExplanationThe timestamp() function returns the sample timestamp of each vector element, and wrapping the changes() filter with it yields the moment the restart counter last moved within the window, which is the requirement. Subtracting the pod start time from now gives an age of the pod rather than a restart moment, and it misses containers restarted after the pod was created. A plain changes() filter returns the count of changes, not when they happened, so it does not answer the timestamp question. max_over_time over the start time returns the latest start timestamp, which is still the pod creation time rather than a container restart.
-
6 Question 6 Single choice Instrumentation and Exporters
A team is standardising the metrics naming across a microservice platform. A service exposes request durations, error counts, and in-flight request gauges, and its engineers have used the names reqDurationMs, errors, and InFlight. The platform owner wants names that follow the Prometheus conventions for base units and suffixes, and needs to rename without breaking existing alerts that use the old names during a migration window. Which approach best satisfies both requirements?
Correct Answer: AExplanationThe Prometheus conventions call for base units such as seconds rather than milliseconds, a _total suffix on counters, and descriptive snake_case names, and emitting both old and new names in parallel lets existing alerts keep working while they are migrated. Keeping the millisecond unit with a suffix contradicts the base unit convention. Using milliseconds with a _total suffix also misapplies the suffix, since _total denotes a counter rather than a duration. Removing the old names immediately breaks the stated migration window and risks silent alert loss.
-
7 Question 7 Single choice PromQL
A platform team runs a Prometheus server that scrapes an HTTP service exposing http_requests_total as a counter. During a rolling deploy, the on-call engineer notices that a dashboard panel showing per-second request rate for the last 5 minutes sometimes reports a negative value immediately after pods restart. The team wants accurate per-second rates across restarts with no changes to the instrumentation. Which PromQL expression should they use in the panel?
Correct Answer: CExplanationrate() is the correct choice for a counter because it detects counter resets caused by process restarts and extrapolates across them, so the per-second value stays non-negative. irate() also handles resets but uses only the last two samples, making it noisy over a 5 minute dashboard window. deriv() applies a linear regression to a gauge and does not understand counter resets, so it can go negative. delta() is meant for gauges and returns a raw difference without reset correction and without normalising to per-second.
-
8 Question 8 Single choice Alerting & Dashboarding
A payments team must page on-call only when the 99th percentile of API latency exceeds 800 ms for at least 10 minutes. The service exposes a classic histogram named api_request_duration_seconds with a route label. The rule must fire only after sustained breach, must not flap on single slow scrapes, and must continue to function if a scrape target is temporarily missing. Which alerting rule configuration meets all three requirements?
Correct Answer: AExplanationPercentiles from a classic histogram must be computed with histogram_quantile over the summed rate of the _bucket series, keeping le, and the for: 10m clause requires the condition to hold continuously before the alert moves to firing, which suppresses flapping. Option B applies rate() to the bare histogram name, which is not a valid series for quantile estimation, and for: 0s ignores the sustained-breach rule. Option C wrongly relies on Alertmanager group_wait, which only delays notification grouping and does not implement a sustained-condition requirement. Option D computes a mean latency, not the 99th percentile, so it answers a different question.
-
9 Question 9 Single choice Observability Concepts
A fintech company is designing its monitoring for a batch settlement service. Engineers want to alert on the fraction of settlement jobs that complete successfully within 30 minutes, and leadership wants a target of 99.5 percent over a 28 day window. The service is short-lived: each job runs as a Kubernetes CronJob and exits, so a Prometheus scrape may never see the job's final state. The team has an existing counter settlement_jobs_total with labels status and outcome. Which decision best aligns the Service Level Indicator and the monitoring design with this requirement?
Correct Answer: AExplanationA ratio of successful to total events taken from counters is the standard SLI for this kind of target, and because the jobs are short-lived and exit before a scrape, the completion state must be pushed to a Pushgateway before exit so it is recorded. Option B measures a resource rather than a user-facing outcome, so it is not an SLI for success. Option C conflates target availability with job success, and a healthy scrape says nothing about whether settlements completed. Option D counts series rather than outcomes and would not reflect success or failure at all.
-
10 Question 10 Single choice Instrumentation and Exporters
A team maintains a Go service that processes queued messages. They want to expose the current depth of an internal in-memory queue, which can increase and decrease, and also the total number of messages processed since start. An engineer proposes naming the depth metric message_queue_depth_total and making it a counter so that it is 'consistent' with the other metric. The organisation enforces the Prometheus naming conventions in code review and wants the dashboards to use the correct functions. What is the best instrumentation approach?
Correct Answer: AExplanationA value that rises and falls is a gauge, and a monotonically increasing total is a counter whose name ends in _total, so rate() is the right function to derive throughput from it. Option B mislabels a fluctuating value as a counter, which breaks reset semantics and misleads rate() users. Option C inverts the metric types, so the counter would be used for a value that cannot be meaningfully differentiated. Option D misapplies histograms to values that do not need distribution buckets and adds unnecessary cardinality without solving the requirement.
-
11 Question 11 Single choice Prometheus Fundamentals
A company runs a Prometheus server in a single Kubernetes cluster to scrape about 4,000 pods. The security team wants Prometheus configuration changes to take effect without restarting the server, because restarts drop the ingestion gap they are required to report on. The platform engineer edits the scrape configuration in the ConfigMap that is mounted into the Prometheus pod. Which action should the engineer take to apply the change with the least disruption?
Correct Answer: DExplanationPrometheus rereads its configuration when it receives SIGHUP, and the /-/reload endpoint works when the server was started with --web.enable-lifecycle. Deleting the pod or restarting the node causes the ingestion gap the security team forbids. Editing the file inside the container is lost on restart and does not reliably trigger reload because Prometheus only reloads on the signal or endpoint. Neither the ConfigMap edit nor a file edit is applied automatically, so an explicit reload is required.
-
12 Question 12 Single choice Observability Concepts
A team is choosing between push and pull collection for a fleet of 300 edge devices that connect to the internet intermittently over cellular links. The devices sit behind carrier NAT, so the central Prometheus server cannot reach them directly. The operations lead insists on keeping the Prometheus pull model for the rest of the estate. The team needs metrics from the edge devices on a best-effort basis and must avoid opening inbound firewall ports. Which design is the most appropriate?
Correct Answer: DExplanationThe Pushgateway accepts outbound pushes from devices that cannot be reached inbound, and Prometheus then pulls from the gateway using the normal scrape model, which keeps the estate's pull architecture intact. Fixed-port exposure fails because carrier NAT blocks inbound connections. Running a Prometheus server on each device is unnecessarily heavy for constrained hardware and federation still requires reachability. Alertmanager is designed for routing alerts, not for carrying time-series metrics, so it would not produce usable metrics data.
-
13 Question 13 Single choice Prometheus Fundamentals
A platform engineer is reviewing a Prometheus deployment for a multi-tenant SaaS company. Tenant teams have been adding a label request_id to their metrics so they can debug individual requests in dashboards. Prometheus memory usage has grown steeply and queries are timing out. The platform engineer must keep request-level debugging available for tenants while restoring query performance and staying within the constraint that the Prometheus server itself must not store per-request series. Which action best meets both requirements?
Correct Answer: BExplanationEach unique label value creates a new time series, so unbounded identifiers such as request IDs cause the cardinality explosion that Prometheus is poorly suited to hold, and per-request debugging belongs in traces or logs. Extending retention makes the memory and query problem worse. Remote_write still ships the high-cardinality series from the local pipeline and does not remove their cost at the source, and hashing into ten buckets still gives an unbounded label on the original data path while destroying per-request identity.
-
14 Question 14 Single choice PromQL
A capacity team wants a panel showing the percentage of memory used per node for nodes in the production cluster. Their metrics are node_memory_MemAvailable_bytes and node_memory_MemTotal_bytes, both gauges with an instance label. A junior engineer proposes a query that divides the two series directly, but the panel returns no data. The team confirms that both series exist and that the scrape targets are healthy. Which query correctly produces the per-instance percentage?
Correct Answer: AExplanationA binary operator between two instant vectors matches series only when their label sets are identical, so the division works here because both series share instance and job labels and the expression correctly computes used memory as one minus the available fraction. The naive division in the junior engineer's query returns no data because the metric names differ and the vector matching fails, which is why the proper approach needs the matching labels to align. Option B reports the free percentage rather than the used percentage. Option C divides by the available memory, giving the wrong denominator. Option D aggregates across all nodes, so it loses the per-instance breakdown the panel needs.
-
15 Question 15 Single choice Alerting & Dashboarding
A SRE team manages Alertmanager for three teams that share a Slack workspace. The database team needs pages for their critical alerts to reach a separate on-call rotation, and they need all their alerts grouped by cluster so that one incident does not generate dozens of notifications. Alerts from the database team carry label team=db and severity=critical. The cost constraint forbids adding a second Alertmanager instance. Which configuration in the single Alertmanager best satisfies all requirements?
Correct Answer: AExplanationAlertmanager routes are matched on labels, so a nested route for team=db and severity=critical sends those alerts to the correct receiver, and group_by cluster collapses related notifications into a single grouped message. Grouping by alertname with inhibition disabled produces more notifications, not fewer. A separate Prometheus server violates the no second instance constraint and does not address routing. Silences suppress notifications rather than route them, so using one to direct alerts would hide the very alerts the team needs.
These are 15 of the 60 questions in the full PCA pack.
Get All 60 QuestionsGet all 60 questions & answers
Full access options for Linux Foundation PCA
Self-study
PDF Version
- 60 actual exam questions
- Compatible with all devices
- Printable PDF format
- No download limits
- 90 days free updates
- 24/7 customer support
Best value
Bundle Pack
- Discounted PDF + online access
- 60 actual exam questions
- Both PDF and online practice test
- Free 90 days updates
- No download or practice limits
- 24/7 customer support
Exam simulation
Online Practice Test
- 60 actual exam questions
- Actual exam environment
- 90 days free updates
- Browser-based software
- 24/7 customer support
100% Money Back Guarantee
Your success comes first
At DumpsProvider, we give you a 100% money back guarantee on all of our exam dumps. For us, your success is the #1 priority and we are more than confident that our exam material will help you pass the PCA Exam (Prometheus Certified Associate) on your very first attempt.
In a rare case, if you fail your exam, we will refund your amount without asking a single question.