Courseiva

PCA · topic practice

Promql practice questions

The PromQL domain covers Prometheus's query language: selecting series with label matchers, applying range vectors and functions, and combining results with operators. Questions are scenario-based, asking you to pick valid metric types, matchers, or functions, and to reason about operator precedence and aggregation behavior when building queries.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Editorial oversight:Johnson Ajibi· MSc IT Security, IEEE Senior Member
20 questionsDomain: Promql

What the exam tests

What to know about Promql

Be able to write and read PromQL: choose correct metric types, build label matchers, apply rate() and histogram_quantile() to histograms, and combine series with operators respecting precedence. The single most important skill is selecting the right function for the metric type and query intent.

Selecting time series using instant and range vector selectors with label matchers

Applying PromQL functions such as rate(), histogram_quantile(), and aggregation operators

Understanding native Prometheus metric types: counter, gauge, histogram, and summary

Evaluating operator precedence and arithmetic, comparison, and logical set operations

Watch out for

Common Promql exam traps

  • ▸Confusing histogram_quantile() with quantile() or assuming summaries expose _bucket series for percentile queries
  • ▸Using =~ regex matchers without anchoring, or treating != and !~ as equivalent to absence of a label
  • ▸Forgetting that rate() needs a range vector and that counters reset, so raw counter values mislead

Practice set

Promql questions

20 questions · select your answer, then reveal the explanation

Question 1easymultiple choice
Read the full Promql explanation →

An 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?

Question 2mediummultiple choice
Read the full Promql explanation →

An 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?

Question 3easymultiple choice
Read the full Promql explanation →

Which label matcher operator is used for exact equality in PromQL selectors?

Question 4hardmultiple choice
Read the full Promql explanation →

You 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?

Question 5mediummultiple choice
Read the full Promql explanation →

An operator writes the query sum(rate(http_requests_total[5m])) without any aggregation clauses. What is the output format?

Question 6hardmulti select
Read the full Promql explanation →

Which TWO of the following conditions will cause the rate() function to return NaN or empty results? (Choose TWO)

Question 7mediummultiple choice
Read the full Promql explanation →

An 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?

Question 8hardmultiple choice
Read the full Promql explanation →

You 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?

Question 9hardmultiple choice
Read the full Promql explanation →

You 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?

Question 10mediummultiple choice
Read the full Promql explanation →

You want to aggregate total memory usage by 'job' using the 'node_memory_Usage_bytes' metric, while keeping the 'instance' label in the output. Which aggregation clause should you use?

Question 11easymultiple choice
Read the full Promql explanation →

Which of the following selectors matches metric names that start with 'http_'?

Question 12hardmultiple choice
Read the full Promql explanation →

You 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?

Question 13easymultiple choice
Read the full Promql explanation →

Which of the following expressions correctly retrieves an instant vector of all HTTP requests with a 200 status code?

Question 14hardmultiple choice
Read the full Promql explanation →

When 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?

Question 15hardmultiple choice
Read the full Promql explanation →

You have two metrics: 'up' (a gauge) and 'process_cpu_seconds_total' (a counter). You want to filter 'process_cpu_seconds_total' by instances where 'up == 1'. Which join modifier is required?

Question 16easymultiple choice
Read the full Promql explanation →

Which operator performs a logical 'not' on a comparison?

Question 17hardmulti select
Read the full Promql explanation →

Which THREE of the following are valid time-range units in PromQL?

Question 18hardmulti select
Read the full Promql explanation →

Which THREE of the following are valid ways to modify a binary operation join?

Question 19easymultiple choice
Read the full Promql explanation →

How does PromQL handle operator precedence between arithmetic operators like multiplication (*) and addition (+)?

Question 20easymultiple choice
Read the full Promql explanation →

Which selector syntax correctly matches all time series where the environment label does NOT equal production?

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Promql sessions

Start a Promql only practice session

Every question in these sessions is drawn from the Promql domain — nothing else.

Related practice questions

Related PCA topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the PCA exam test about Promql?
Be able to write and read PromQL: choose correct metric types, build label matchers, apply rate() and histogram_quantile() to histograms, and combine series with operators respecting precedence. The single most important skill is selecting the right function for the metric type and query intent.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Promql questions in a focused session?
Yes — the session launcher on this page draws every question from the Promql domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other PCA topics?
Use the topic links above to move to related areas, or go back to the PCA question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the PCA exam covers. They are not copied from any real exam or dump site.