CNCF / Linux Foundation · Free Practice Questions · Last reviewed May 2026
30 real exam-style questions organised by domain, each with the correct answer highlighted and a plain-English explanation of why it's right — and why the others are wrong.
How does PromQL handle operator precedence between arithmetic operators like multiplication (*) and addition (+)?
Operators are evaluated strictly from left to right regardless of type.
Operators are evaluated strictly from right to left.
Multiplication has higher precedence than addition.
PromQL follows standard arithmetic precedence, so multiplication and division bind more tightly than addition and subtraction. Thus in an expression mixing * and +, the multiplication is evaluated first, matching conventional mathematical ordering rather than strict left-to-right evaluation.
Addition has higher precedence than multiplication.
Which selector syntax correctly matches all time series where the environment label does NOT equal production?
http_requests_total{environment=~"^((?!production).)*$"}
http_requests_total{environment!="production"}
The != operator is Prometheus's label matcher for inequality, so environment!="production" selects every time series of http_requests_total whose environment label holds any value other than production. This satisfies the stem's requirement to exclude production while retaining all other environments.
http_requests_total{environment!~"production"}
http_requests_total{environment!^"production"}
An administrator wants to aggregate CPU usage across all nodes, keeping the instance label while summing the values. Which aggregation clause should be used?
sum(node_cpu_seconds_total) keeping (instance)
sum by (instance) (node_cpu_seconds_total)
The by (instance) modifier groups series by the instance label and sums each group's CPU counters, retaining instance while collapsing other labels such as cpu and mode. This satisfies the stem's requirement to aggregate across nodes yet keep instance.
sum(node_cpu_seconds_total) group by (instance)
sum without (instance) (node_cpu_seconds_total)
When performing a vector-to-vector binary operation between two instant vectors of different label sets, which modifier allows matching on a subset of common labels?
group_left(...)
ignoring(...)
matching(...)
on(...)
The `on(...)` modifier restricts matching to the labels you list, so vectors with differing label sets still pair up on that shared subset. Without it, Prometheus requires identical label sets for vector-to-vector binary operations, returning no results. This directly satisfies the stem's constraint of matching on common labels only.
A user executes an instant query for a metric without providing a range vector. What type of vector is returned by default?
String
Range vector
Scalar
Instant vector
An instant query evaluates at a single timestamp, so PromQL returns an instant vector holding one sample per matching series. This satisfies the stem's default behaviour, since a range vector only appears when the selector explicitly supplies a duration such as [5m].
You need to calculate the 99th percentile HTTP request latency from a Prometheus histogram named http_request_duration_seconds. Which function is correct?
rate(histogram_quantile(0.99, http_request_duration_seconds_bucket)[5m])
quantile_over_time(0.99, http_request_duration_seconds[5m])
histogram_quantile(0.99, rate(http_request_duration_seconds_bucket[5m]))
histogram_quantile() estimates the 0.99 quantile from the le bucket series, and rate() over the 5m range converts cumulative bucket counters into per-second rates. This satisfies the constraint of computing the 99th percentile latency from a histogram rather than a summary.
histogram_quantile(http_request_duration_seconds_bucket[5m], 0.99)
Want more Promql practice?
Practice this domainWhen configuring Alertmanager to send notifications to Slack, which block defines the routing tree?
receivers
inhibit_rules
route
The `route` block defines Alertmanager's routing tree, matching alerts to receivers by label. It satisfies the requirement to direct Slack notifications, since child routes inherit and override parent settings, with `receiver: slack` specified at the appropriate node. Without `route`, no alert reaches the Slack receiver.
global
Which file format does Prometheus use for its main configuration?
XML
JSON
TOML
YAML
Prometheus reads its main configuration from a YAML file, conventionally `prometheus.yml`, parsed at startup and on reload. This satisfies the stem's requirement for the native format of the primary config file, where scrape jobs, rule files and service discovery targets are declared.
In the Prometheus data model, what is a 'sample'?
The metric name
A label key-value pair
A value and a timestamp
A sample is the smallest unit of data in the Prometheus model: a single float64 value paired with a millisecond-precision timestamp. A time series is an ordered sequence of such samples identified by its metric name and labels.
An alert rule
You are deploying Prometheus in a Kubernetes cluster and need to ensure it discovers pods labeled 'app=frontend'. Which configuration block is required?
kubernetes_sd_configs
kubernetes_sd_configs is the service discovery block that queries the Kubernetes API for pods, services and endpoints. It supplies the role-based targets Prometheus needs to find pods labelled app=frontend, satisfying the discovery requirement in the stem.
dns_sd_configs
static_configs
file_sd_configs
A batch job runs for only 30 seconds every hour. How should you expose these metrics to Prometheus?
Use the Pushgateway
The Pushgateway accepts metrics from short-lived jobs that Prometheus cannot reliably scrape within their 30-second lifetime. Because the batch job terminates before a scrape interval elapses, it must push its metrics to the Pushgateway, which retains them for Prometheus to collect afterwards.
Use an exporter sidecar
Increase scrape interval to 1 hour
Add a scrape_config for the batch job
Which component is responsible for receiving alerts from Prometheus and managing notification delivery?
Alertmanager
Alertmanager receives alerts pushed by Prometheus and handles their routing, grouping, inhibition and silencing before dispatching notifications to receivers such as email, Slack or PagerDuty. This satisfies the stem's requirement for the component managing notification delivery, since Prometheus itself only evaluates rules and fires alerts.
Prometheus Server
Exporter
Pushgateway
Want more Prometheus Fundamentals practice?
Practice this domainYou are deploying Prometheus in a cluster with highly dynamic ephemeral pods. Which concern is the most significant regarding cardinality?
The network bandwidth used by the pushgateway.
The disk space used by WAL logs.
The number of targets being scraped.
The memory overhead of storing time series with unique label sets.
Each unique label combination creates a distinct time series held in memory, so ephemeral pods with churning names, IDs or hashes generate vast numbers of short-lived series. This memory overhead, not scrape volume, is the dominant cardinality constraint in dynamic clusters.
You notice that your Prometheus instance memory usage is growing linearly despite constant traffic. What is the most likely cause?
CPU throttling.
Network latency.
Increasing metric cardinality.
Each distinct label combination creates a separate time series held in memory. With constant traffic but rising cardinality, new series accumulate faster than stale ones are garbage-collected, so memory grows linearly. This directly explains the symptom described in the stem.
Too many alert rules.
In the context of the Four Golden Signals, what does 'Saturation' measure?
The number of 5xx errors.
The amount of queued work.
Saturation quantifies how full a resource is, typically expressed as queued work awaiting service, such as requests in a queue or threads waiting. It signals impending degradation before latency or errors appear, matching the Four Golden Signals definition the stem requests.
The speed of the network.
The number of successful requests.
A legacy batch job runs once per day and finishes in seconds. Why is a standard Prometheus pull model inadequate here?
The data is too large for memory.
Pull model is insecure.
Prometheus cannot scrape batch jobs.
The job is too fast for HTTP polling.
A short-lived batch job may exit before Prometheus's next scrape interval, so its metrics endpoint disappears and the samples are never collected. This directly satisfies the stem's constraint: the job finishes in seconds, far quicker than typical polling, requiring a push gateway or similar mechanism instead.
A system is experiencing high latency. You need to identify if the latency is caused by external dependencies. Which of the Four Golden Signals is most relevant for this discovery?
Latency
Latency as a Golden Signal distinguishes successful-request duration from error duration, so you can break down response time by dependency. If external calls dominate the slow percentile, the latency originates outside the service, directly satisfying the need to isolate external-dependency causation.
Errors
Saturation
Traffic
What is the primary drawback of using the Pushgateway for long-running services?
It requires manual restarts.
It lacks metric persistence.
Prometheus cannot query the Pushgateway.
It bypasses Prometheus's liveness check for the source.
Pushgateway accepts pushed metrics without verifying that the source service is still running, so Prometheus scrapes stale values indefinitely. This directly satisfies the stem's constraint: long-running services lose Prometheus's liveness detection, since the target's up metric reflects the gateway, not the actual service instance.
Want more Observability Concepts practice?
Practice this domainYou have a Prometheus alerting rule that triggers too frequently during flapping states. Which feature should you use to prevent this without silencing the alert entirely?
The 'resolve_timeout' parameter
The 'for' field
The 'for' field requires the alert's condition to remain true for a specified duration before firing, so brief flapping spikes are ignored while sustained problems still alert. This suppresses transient noise without silencing the rule entirely, unlike inhibition or muting.
The 'group_wait' parameter
The 'inhibit_rules' block
You have a recording rule named 'job:node_cpu:avg_rate_5m'. Where is this metric stored once the rule is executed?
In the Prometheus TSDB
Recording rules evaluate their expression and write the resulting samples back into the Prometheus time-series database under the new metric name. The rule does not create a separate store; results persist in the TSDB alongside scraped metrics.
In the Alertmanager memory
In the Grafana database
In a local flat file
When configuring Alertmanager 'group_by' settings, what happens if you include a label that is not present on an incoming alert?
The alert is dropped
The alert triggers an error in the logs
The routing rule fails
The alert is grouped under a null value
Alertmanager evaluates group_by labels against each alert's label set. A label absent from an incoming alert resolves to an empty string, so all alerts missing that label collapse into a single group keyed by a null value.
You need to prevent an alert from firing if a maintenance window is active. How should you approach this in Alertmanager?
Delete the alerting rule
Modify the routing tree
Use a Silence
A Silence matches alerts by label set and suppresses notifications for a defined time window, which maps directly onto a scheduled maintenance period. Unlike inhibition, which depends on another firing alert, a Silence is time-bounded and configured in advance, satisfying the maintenance-window constraint.
Add a 'skip' label to the rule
You have a global Alertmanager configuration where you want to suppress 'DiskSpaceLow' alerts if 'InstanceDown' is active for the same host. Which mechanism accomplishes this?
Inhibition rules
Inhibition rules suppress a target alert when a matching source alert is firing, using equal label matchers such as instance. This directly satisfies the stem's requirement to mute DiskSpaceLow while InstanceDown is active for the same host, which silences and routing cannot achieve.
Route tree
Repeat intervals
Grouping
You notice that recording rules are consuming too much CPU on your Prometheus server. What is the most effective way to reduce the load while keeping data available?
Decrease the evaluation_interval
Move recording rules to Alertmanager
Increase the evaluation_interval
Raising evaluation_interval lengthens the gap between rule evaluations, so each rule query executes less often and consumes proportionally less CPU. Recorded series remain written to storage, satisfying the constraint of keeping data available while cutting load.
Delete all indices
Want more Alerting And Dashboarding practice?
Practice this domainYour application has a short-lived batch job that finishes before the Prometheus server can scrape it. What architectural component should be used?
Prometheus API
Pushgateway
Pushgateway lets short-lived batch jobs push their metrics to an intermediary that Prometheus then scrapes, since the job terminates before a normal pull scrape can occur. This satisfies the stem's constraint of a job finishing before scraping.
Alertmanager
node_exporter
You need to track the number of requests received by your application. Which metric type should you choose?
Counter
A Counter is a monotonically increasing value that only goes up, resetting to zero on restart, which suits a cumulative request tally. Tracking requests received requires this monotonic behaviour, and rate() or increase() can then derive per-second rates.
Summary
Gauge
Histogram
Which action should be avoided when creating labels for custom metrics?
Using static labels
Adding job labels
Adding instance labels
Using high-cardinality labels
High-cardinality labels, such as unique user IDs or timestamps, create unbounded time series that inflate storage costs and slow PromQL queries. The stem asks what to avoid, and this directly violates the cardinality constraint that keeps custom metrics performant and cost-effective in Prometheus.
When implementing a custom exporter, what format must the output follow to be correctly scraped by Prometheus?
JSON
XML
Prometheus Text Format
Prometheus scrapes metrics endpoints expecting the Prometheus Text Format, a line-based exposition syntax of metric name, optional labels and a sample value. A custom exporter emitting JSON, CSV or XML cannot be parsed by the scrape pipeline, so the text format satisfies the stem's scraping requirement.
Binary Protobuf
You are using the blackbox_exporter to monitor an HTTP endpoint. Which module configuration is required to check the HTTP status code?
http_2xx
The http_2xx module probes the endpoint and marks success only when the returned HTTP status code falls in the 2xx range, directly satisfying the requirement to check the status code. Other modules such as tcp_connect or icmp test reachability, not HTTP response codes.
dns_query
tcp_connect
icmp_ping
A developer wants to expose a metric that represents the current memory usage of a process. Which type is most appropriate?
Counter
Summary
Gauge
A gauge represents a value that can rise or fall arbitrarily, such as current memory usage, which fluctuates as a process allocates and releases memory. Counters and histograms cannot capture this instantaneous, bidirectional measurement correctly.
Histogram
Want more Instrumentation And Exporters practice?
Practice this domainThe PCA exam is performance-based — there are no multiple-choice questions. It is a hands-on lab exam completed within 90 minutes. You complete practical tasks in a live or simulated environment. Courseiva practice questions cover the underlying concepts.
Hands-on labs and command-line tasks in a live Kubernetes cluster.
The exam covers 5 domains: Promql, Prometheus Fundamentals, Observability Concepts, Alerting And Dashboarding, Instrumentation And Exporters. Questions are weighted by domain — higher-weight domains appear more on your actual exam.
No. These are original exam-style practice questions written against the official CNCF / Linux Foundation PCA exam objectives. They are not copied from the real exam. Courseiva focuses on genuine understanding, not memorisation of braindumps.
Courseiva tracks your accuracy per domain and routes you toward weak areas automatically. Free, no account required.