Linux Foundation - Big Savings Alert – Don’t Miss This Deal - Ends In 1d 00h 00m 00s Coupon code: 26Y30OFF
  1. Home
  2. Linux Foundation
  3. PCA Exam
  4. Free PCA Questions

Free Practice Questions for Linux Foundation PCA Exam

Pass4Future also provide interactive practice exam software for preparing Linux Foundation Prometheus Certified Associate (PCA) Exam effectively. You are welcome to explore sample free Linux Foundation PCA Exam questions below and also try Linux Foundation PCA Exam practice test software.

Page:    1 / 14   
Total 60 questions

Question 1

Which PromQL expression computes how many requests in total are currently in-flight for the following time series data?

apiserver_current_inflight_requests{instance="1"} 5

apiserver_current_inflight_requests{instance="2"} 7



Answer : B

In Prometheus, when you have multiple time series that represent the same type of measurement across different instances, the sum() aggregation operator is used to compute their total value.

Here, each instance (1 and 2) exposes the metric apiserver_current_inflight_requests, indicating the number of active API requests currently being processed.

To find the total number of in-flight requests across all instances, the correct expression is:

sum(apiserver_current_inflight_requests)

This returns 5 + 7 = 12.

min() would return the lowest value (5).

max() would return the highest value (7).

sum_over_time() calculates the cumulative sum over a range vector, not the current value, so it's incorrect here.


Verified from Prometheus documentation -- Aggregation Operators and Summing Across Dimensions sections.

Question 2

Which PromQL expression computes the rate of API Server requests across the different cloud providers from the following metrics?

apiserver_request_total{job="kube-apiserver", instance="192.168.1.220:6443", cloud="aws"} 1

apiserver_request_total{job="kube-apiserver", instance="192.168.1.121:6443", cloud="gcloud"} 5



Answer : C

The rate() function computes the per-second increase of a counter metric over a specified range, while sum by (label) aggregates those rates across dimensions --- in this case, the cloud label.

The correct query is:

sum by (cloud)(rate(apiserver_request_total{job='kube-apiserver'}[5m]))

This expression:

Calculates the rate of increase in API requests per second for each instance.

Groups and sums those rates by cloud, giving the total request rate per cloud provider.

Option A incorrectly places by (cloud) after rate(), which is not valid syntax.

Option B returns raw counter totals (not rates).

Option D incorrectly applies rate() after aggregation, which distorts the calculation since rate() must operate on individual time series before aggregation.


Verified from Prometheus documentation -- rate() Function, Aggregation Operators, and Querying Counters Across Labels sections.

Question 3

What is an example of a single-target exporter?



Answer : A

A single-target exporter in Prometheus is designed to expose metrics for a specific service instance rather than multiple dynamic endpoints. The Redis Exporter is a prime example --- it connects to one Redis server instance and exports its metrics (like memory usage, keyspace hits, or command statistics) to Prometheus.

By contrast, exporters like the SNMP Exporter and Blackbox Exporter can probe multiple targets dynamically, making them multi-target exporters. The Node Exporter, while often deployed per host, is considered a host-level exporter, not a true single-target one in configuration behavior.

The Redis Exporter is instrumented specifically for a single Redis endpoint per configuration, aligning it with Prometheus's single-target exporter definition. This design simplifies monitoring and avoids dynamic reconfiguration.


Verified from Prometheus documentation and official exporter guidelines -- Writing Exporters, Exporter Types, and Redis Exporter Overview sections.

Question 4

What is a difference between a counter and a gauge?



Answer : D

The key difference between a counter and a gauge in Prometheus lies in how their values change over time. A counter is a cumulative metric that only increases---it resets to zero only when the process restarts. Counters are typically used for metrics like total requests served, bytes processed, or errors encountered. You can derive rates of change from counters using functions like rate() or increase() in PromQL.

A gauge, on the other hand, represents a metric that can go up and down. It measures values that fluctuate, such as CPU usage, memory consumption, temperature, or active session counts. Gauges provide a snapshot of current state rather than a cumulative total.

This distinction ensures proper interpretation of time-series trends and prevents misrepresentation of one-time or fluctuating values as cumulative metrics.


Extracted and verified from Prometheus official documentation -- Metric Types section explaining Counters and Gauges definitions and usage examples.

Question 5

Which of the following is an invalid @ modifier expression?



Answer : D

The @ modifier in PromQL allows querying data as it existed at a specific point in time rather than the evaluation time. It can be applied after a selector or an entire expression, but the syntax rules are strict.

go_goroutines @ start() Valid; queries value at the start of the evaluation range.

sum(http_requests_total{method='GET'}) @ 1609746000 Valid; applies the modifier after the full expression.

go_goroutines @ end() Valid; queries value at the end of the evaluation range.

sum(http_requests_total{method='GET'} @ 1609746000) Invalid, because the @ modifier cannot appear inside the selector braces; it must appear after the selector or aggregation expression.

This invalid placement violates PromQL's syntax grammar for subquery and modifier ordering.


Verified from Prometheus documentation -- PromQL @ Modifier Syntax, Evaluation Modifiers, and PromQL Expression Grammar sections.

Page:    1 / 14   
Total 60 questions