PCA · domain
Promql
Practise Prometheus Certified Associate (PCA, CNCF/Linux Foundation) (PCA) Promql practice questions — original exam-style scenarios with answer choices, explanations, and analysis of common mistakes.
Focused practice
Practice Promql questions
Scored sessions drawing only from this domain — pick a length below.
Start 20-question practice test →What this domain covers
What to know about Promql
Promql questions test whether you can apply the concept in context, not just recognise a definition.
How the topic appears in realistic exam-style scenarios.
Which detail in the question changes the correct answer.
How to eliminate plausible but wrong options.
How to connect the question back to the wider exam objective.
Watch out for
Common Promql exam traps
- ▸Answering from memory before reading the full scenario.
- ▸Missing a constraint such as cost, availability, security, scope or command context.
- ▸Choosing a broad answer when the question asks for the most specific fix.
- ▸Ignoring why the wrong options are tempting.
Question index
All Promql questions (81)
Click any question to see the full explanation, or start a practice session above.
If you perform 'A / B' where A and B have different sets of labels, what happens?
Hard2Which THREE of the following functions can be used with counter metrics to calculate rates or increases? (Choose three)
Medium3Which TWO of the following statements about PromQL label matchers are correct? (Choose TWO)
Hard4You need to calculate the per-second rate of increase of http_requests_total over a 1-minute window. Why is using a 1-minute range window generally discouraged in production?
Medium5Which function should be used to smooth out short-term fluctuations in a gauge metric by calculating the rolling average over a 10-minute window?
Medium6You are joining two vectors where the left vector has labels {job="api", instance="host1"} and the right vector has labels {job="api", region="us-east"}. You use the query 'vector_a + ignoring(instance, region) vector_b'. What does the 'ignoring' modifier do?
Hard7What is the primary difference between an instant vector and a range vector in PromQL?
Easy8What is the difference between 'count' and 'count_values'?
Easy9You are troubleshooting a query and notice that label_replace is being used. What is the primary function of label_replace(v, dst_label, replacement, src_label, regex)?
Hard10Which THREE of the following are valid set operators in PromQL for combining instant vectors? (Choose THREE)
Medium11Which function evaluates the predictable linear extrapolation of a gauge metric over time to predict future values?
Medium12When writing a query with arithmetic operators, how does PromQL handle vector matching when both vectors have the exact same label sets?
Medium13Which TWO of the following statements regarding native histograms in Prometheus are correct? (Choose TWO)
Hard14You need to perform a binary operation between two vectors where the left vector has labels {job="api", instance="a"} and the right vector has labels {job="api"}. You want to match them using the job label while retaining the instance label from the left side. Which modifier configuration is correct?
Hard15Which of the following selectors matches metric names that start with 'http_'?
Easy16When performing vector matching between two vectors of different cardinalities, which THREE vector matching modifiers can be used? (Choose three)
Hard17A Prometheus selector includes a negative regex match for environment names: 'environment!="staging"'. Which selector operator achieves this using regular expressions instead of exact matching?
Easy18You are joining an instant vector of application versions with an instant vector of metrics using a many-to-one relationship. The application version vector has more labels than the metric vector. Which keyword must be appended to the matching modifier to include labels from the 'many' side?
Hard19Which TWO of the following are valid data types returned by PromQL queries? (Choose two)
Easy20A user executes an instant query for a metric without providing a range vector. What type of vector is returned by default?
Easy21Which operator performs a logical 'not' on a comparison?
Easy22An engineer executes topk(3, http_requests_total). What happens if there are fewer than 3 time series matching the selector?
Hard23You are using the 'predict_linear()' function to forecast disk space exhaustion based on the metric 'node_filesystem_free_bytes'. What type of input data does predict_linear require?
Medium24Which TWO of the following are valid aggregation operators in PromQL?
Medium25An operator writes a query to calculate error percentage: sum(rate(errors[5m])) / sum(rate(total[5m])) * 100. What happens if the denominator evaluates to zero or has no matching time series?
Medium26You are monitoring a counter metric 'errors_total' and need to calculate the total number of errors that occurred over the last 1 hour. Which function is most appropriate?
Medium27You need to calculate the ratio of successful HTTP requests (status 200) to total HTTP requests. Both metrics are counters named 'http_requests_total'. How do you construct this query to ensure proper label matching between status='200' and total requests?
Hard28You need to calculate the 99th percentile of request latency across all instances using a Prometheus histogram metric 'http_request_duration_seconds_bucket'. Which function and setup is correct?
Hard29What is the behavior of the clamp_max() function when applied to an instant vector?
Hard30A Prometheus administrator wants to query the current value of the metric 'http_requests_total'. Which of the following PromQL expressions should be used?
Easy31You are joining an instant vector of application metrics with a static configuration instant vector containing target metadata using 'on(instance) group_right'. What does the 'group_right' modifier achieve?
Hard32When should you use the 'absent()' function?
Medium33Which label matcher operator is used for exact equality in PromQL selectors?
Easy34When evaluating a PromQL query involving arithmetic operators, such as 'vector1 + vector2 * vector3', which operator has the highest precedence?
Medium35Which TWO of the following label matching operators are supported in Prometheus label selectors? (Choose two)
Easy36Which THREE of the following are valid time-range units in PromQL?
Hard37Which THREE of the following modifiers or keywords are used in PromQL binary vector matching? (Choose THREE)
Medium38A Prometheus alert expression uses rate(http_requests_total[5m]) > 10. During a service restart, counter resets occur. How does the rate() function account for these counter resets?
Hard39Which THREE aggregation operators in PromQL support the 'by' and 'without' clause modifiers? (Choose three)
Medium40Which PromQL function is specifically designed to calculate the per-second average rate of increase of a time series over a given range vector?
Easy41When using 'irate', what is the impact of choosing a range vector that is too small (e.g., [10s])?
Hard42When evaluating a rule with offset, such as http_requests_total offset 1h, what exact time does Prometheus query?
Hard43Which TWO of the following are valid ways to modify or add labels to time series in PromQL? (Choose two)
Medium44You want to find the maximum value of a gauge metric across all instances over a 1-hour sliding window. Which function accomplishes this?
Hard45An administrator wants to aggregate CPU usage across all nodes, keeping the instance label while summing the values. Which aggregation clause should be used?
Medium46You want to find the top 3 jobs with the highest CPU usage using the metric 'process_cpu_seconds_total'. Which PromQL query structure is correct?
Medium47When evaluating a histogram metric, what does the special pseudo-label le represent in bucket time series?
Medium48Which aggregation operator would you use to calculate the total sum of a metric across all instances?
Medium49What is the purpose of the 'offset' modifier in a PromQL query?
Easy50Which PromQL aggregator should be used to count the total number of active time series matching a selector?
Easy51When calculating the 95th percentile from a histogram, why is histogram_quantile(0.95, sum(rate(http_duration_seconds_bucket[5m])) by (le)) the recommended pattern?
Hard52When writing a PromQL query involving a vector and a scalar, such as 'node_memory_free_bytes / (1024 * 1024)', how does Prometheus handle label matching?
Medium53Which TWO of the following are true regarding instant vectors?
Medium54Which TWO of the following conditions will cause the rate() function to return NaN or empty results? (Choose TWO)
Hard55You need to calculate the per-second rate of increase for a counter metric over the last 10 minutes. Which function is most appropriate?
Medium56Which THREE of the following are valid ways to modify a binary operation join?
Hard57Which selector syntax correctly matches all time series where the environment label does NOT equal production?
Easy58Which THREE of the following functions are specifically designed to be used with range vectors? (Choose THREE)
Medium59Which TWO of the following are valid metric types natively supported by Prometheus? (Choose TWO)
Easy60How does PromQL handle operator precedence between arithmetic operators like multiplication (*) and addition (+)?
Easy61Which THREE of the following are valid aggregation operators in PromQL? (Choose THREE)
Medium62Which regular expression matcher selects all time series where the status label begins with the digit 5?
Easy63Which TWO of the following statements about 'rate' vs 'irate' are correct?
Medium64How does Prometheus handle subqueries embedded within an instant query, such as rate(http_requests_total[5m])[30m:1m]?
Hard65Which THREE built-in functions in PromQL are designed specifically to analyze changes over time for gauge metrics? (Choose three)
Hard66Which TWO of the following statements regarding PromQL subqueries are correct? (Choose two)
Hard67Which function would you use to find the maximum value of a gauge metric 'node_cpu_load' over the past 30 minutes?
Easy68You need to calculate the 99th percentile HTTP request latency from a Prometheus histogram named http_request_duration_seconds. Which function is correct?
Medium69What is the purpose of the instant vector selector syntax http_requests_total{job="api-server"}?
Easy70Which function is best suited for identifying the 'top 5' instances with the highest value for a specific metric?
Medium71Which operator has higher precedence in PromQL: exponential (^), multiplication (*), or addition (+)?
Easy72An operator needs to find the rate of change of a counter using deriv(). Why is this considered a bad practice in Prometheus?
Hard73Which operator has the highest precedence in PromQL?
Medium74An operator needs to query the current, un-extrapolated rate of increase per second over the last 5 minutes for a counter metric named http_requests_total. Which function should they use?
Easy75What is the result of applying a range selector like [5m] to a gauge metric?
Easy76An operator writes the query sum(rate(http_requests_total[5m])) without any aggregation clauses. What is the output format?
Medium77When 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?
Medium78An engineer needs to determine the total absolute increase in disk space consumed over the last 3 hours using a gauge metric node_disk_bytes_used. Which function is appropriate?
Medium79Which THREE of the following are valid label matchers?
Hard80When executing a subquery in PromQL, such as 'max_over_time(rate(http_request_total[5m])[30m:1m])', what does the resolution parameter ('1m') specify?
Hard81What is the primary operational difference between the 'rate()' and 'irate()' functions in PromQL?
MediumOther domains
All PCA exam domains
Frequently asked questions
- What does the Promql domain cover on the PCA exam?
- Promql questions test whether you can apply the concept in context, not just recognise a definition.
- How many questions are in this domain?
- This page lists all 81 Promql questions in the PCA question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
- What is the best way to practise this domain?
- Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
- Can I practise only Promql questions?
- Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.