Question bank
Prometheus Certified Associate
42 Prometheus Certified Associate questions with the correct answer and a written explanation, organised across 5 exam domains.
- 42 questions
- 5 domains
- Foundation level
Question index
Jump straight to any question. Answers and explanations are inline.
Alerting & Dashboarding
8 questions in this domain
- Question 1Single Choice
Which PromQL label matcher is the most efficient and commonly used for filtering by a known label value?
- AEquality matcher (=)Correct answer
- BInequality matcher (!=)
- CRegex matcher (=~)
- DNegative regex matcher (!~)
Why this is the answer
Equality matchers provide exact matching and are the most efficient and frequently used selectors in PromQL.
- Question 2Multiple Select
Which statements about PromQL regex matchers are true?
- APromQL regex matchers use RE2 syntax.Correct answer
- BThe =~ matcher selects series whose label value matches the pattern.Correct answer
- CThe !~ matcher excludes series whose label value matches the pattern.Correct answer
- DRegex matchers always have lower computational overhead than equality matchers.
Why this is the answer
PromQL regex matchers use RE2 syntax, =~ selects matching series, and !~ excludes matching series. Regex matching has higher overhead than equality matching.
- Question 3Interactive
Examine the PromQL selector in the code block. Which type of label matcher is applied to the job label?
- ARegex matcher (=~)Correct answer
- BEquality matcher (=)
- CInequality matcher (!=)
- DNegative regex matcher (!~)
Why this is the answer
The selector uses =~, which is a regex matcher that follows RE2 syntax and selects labels matching the pattern api.*.
- Question 4Single Choice
Which aggregation operator should you use to determine the number of active instances reporting a metric?
- Asum()
- Bavg()
- Ccount()Correct answer
- Dmax()
Why this is the answer
count() returns the number of time series in the group, whereas sum() adds the values together.
- Question 5Multiple Select
Which of the following are valid PromQL label matching operators?
- A=Correct answer
- B!=Correct answer
- C=~Correct answer
- D!~Correct answer
Why this is the answer
PromQL supports equality, inequality, regex, and negative regex label matchers: =, !=, =~, and !~.
- Question 6Interactive
The expression in the code block attempts to add two metrics. What is the default vector matching behavior when their label sets differ?
- AThe operation returns no time series.Correct answer
- BThe operation automatically performs a many-to-one match.
- CThe operation ignores the extra labels.
- DThe operation returns a Cartesian product.
Why this is the answer
Arithmetic operations require exactly matching label sets. Without on() or ignoring(), differing label sets cause an empty result.
- Question 7Single Choice
Which function is designed to calculate the average per-second increase of a counter over a time range?
- Arate()Correct answer
- Birate()
- Cincrease()
- Ddelta()
Why this is the answer
rate() returns the average per-second increase over the range; irate() uses only the last two samples instead.
- Question 8Multiple Select
Which statements about the by and without aggregation modifiers are correct?
- Aby preserves only the labels listed in the clause.Correct answer
- Bwithout removes the labels listed in the clause from the result.Correct answer
- CAn aggregation with no by clause removes all labels from the resulting series.Correct answer
- Dwithout is required to keep a label in the aggregation result.
Why this is the answer
by keeps listed labels, without strips listed labels, and an aggregation without by strips all labels from the result.
Instrumentation and Exporters
6 questions in this domain
- Question 9Single Choice
Which PromQL label matcher uses exact matching and is the most efficient selector?
- A=Correct answer
- B!=
- C=~
- D!~
Why this is the answer
Equality matchers (=) compare labels for exact equality and are the most efficient and frequently used selectors in PromQL.
- Question 10Multiple Select
Which two statements about PromQL label matchers are correct?
- AThe =~ matcher supports RE2 regular expressions.Correct answer
- BThe != matcher excludes series whose label value matches the given string.Correct answer
- CLabel matching is case-insensitive.
- DShell globbing patterns such as * are valid in every PromQL matcher.
Why this is the answer
The =~ matcher uses RE2 regex syntax, and != excludes exact label values. PromQL label matching is case-sensitive and does not use shell globbing.
- Question 11Interactive
Review the PromQL selector shown in the code block. Given that all available series have a lower-case environment label value, what will the expression return?
- ANo time series are matched.Correct answer
- BAll time series are matched.
- CThe expression returns an error.
- DThe label value is converted to lower case automatically.
Why this is the answer
PromQL label matching is case-sensitive, so matching against a differently cased value returns no time series.
- Question 12Single Choice
Which aggregation operator computes the arithmetic mean of the selected time series values?
- Asum
- BavgCorrect answer
- Cmax
- Dcount
Why this is the answer
The avg aggregation operator calculates the arithmetic mean of the values in the resulting time series.
- Question 13Multiple Select
Which two clauses control label retention during a PromQL aggregation?
- AbyCorrect answer
- BwithoutCorrect answer
- Con
- Doffset
Why this is the answer
The by and without clauses control which labels are preserved or stripped during aggregation, changing the result granularity.
- Question 14Interactive
The code block contains a PromQL expression applied to a gauge metric. What is the fundamental problem with this query?
- Arate() should only be used with counter metrics.Correct answer
- BThe range vector must be longer than the metric retention period.
- CThe metric name should include a _total suffix.
- DThe expression is valid and appropriate for a gauge.
Why this is the answer
rate() is designed for monotonically increasing counters; applying it to a gauge produces an invalid or misleading result.
Observability Concepts
8 questions in this domain
- Question 15Single Choice
What is the primary function of the equality matcher (=) in PromQL label selection?
- AIt requires an exact match between the label key and the provided string value.Correct answer
- BIt performs a case-insensitive substring match.
- CIt matches any label value using RE2 regular expression syntax.
- DIt excludes time series whose label value equals the specified string.
Why this is the answer
The equality matcher (=) selects time series by requiring an exact match between the label key and the provided string value. It is the most efficient and frequently used selector.
- Question 16Multiple Select
Which of the following are valid label matching operators in PromQL?
- A=Correct answer
- B!=Correct answer
- C=~Correct answer
- D==
Why this is the answer
PromQL uses =, !=, =~, and !~ as label matching operators. In the options shown, =, !=, and =~ are valid; == is not a PromQL label matching operator.
- Question 17Interactive
Review the PromQL expression in the code block. What is the label selector component?
- AThe portion inside curly braces, including the bracesCorrect answer
- BThe metric name only
- CThe function wrapping the expression
- DThe time duration in brackets
Why this is the answer
In a PromQL vector selector, the label selector is the component inside curly braces {}. The metric name identifies the metric, and the braces contain the label filters.
- Question 18Single Choice
Which PromQL operator is used to exclude time series that match a regular expression pattern?
- A!~Correct answer
- B!=
- C=~
- D=
Why this is the answer
The negative regex matcher (!~) excludes time series whose label value matches the provided RE2 regular expression pattern.
- Question 19Multiple Select
Which aggregation operators are specifically used to identify boundary values for threshold monitoring?
- Amin()Correct answer
- Bmax()Correct answer
- Csum()
- Dcount()
Why this is the answer
Min and Max aggregations identify the lowest and highest values in a group of series, making them ideal for threshold monitoring such as detecting peak load or minimum available disk space.
- Question 20Interactive
According to the aggregation expression in the code block, which label will be preserved in the result?
- AjobCorrect answer
- Binstance
- CNo labels are preserved
- Dhttp_requests_total
Why this is the answer
The by clause specifies which labels to preserve in the aggregation result. Because the expression uses by (job), only the job label is retained.
- Question 21Single Choice
Why should sum() not be used to count the number of active time series?
- ABecause sum() adds the values of the series, whereas count() returns the number of seriesCorrect answer
- BBecause sum() only works with gauge metrics
- CBecause count() ignores labels and sum() preserves labels
- DBecause sum() averages values and count() adds them
Why this is the answer
sum() aggregates series by adding their values, while count() returns the number of time series present. Using sum() to count active targets confuses value addition with series presence.
- Question 22Multiple Select
Which of the following are common label matching traps identified in the guide?
- AUsing * instead of .* in regex matchersCorrect answer
- BUsing != with wildcard regex patternsCorrect answer
- CForgetting that label matching is case-sensitiveCorrect answer
- DUsing the equality matcher = for exact matches
Why this is the answer
Common traps include confusing PromQL RE2 syntax with shell globbing, misapplying inequality matchers to regex patterns, and forgetting that label matching is case-sensitive. Using = for exact matches is correct, not a trap.
PromQL
12 questions in this domain
- Question 23Single Choice
Which label matcher in PromQL requires an exact match between the label key and the provided string value?
- A=Correct answer
- B!=
- C=~
- D!~
Why this is the answer
The equality matcher (=) is the most efficient and frequently used selector for known label values. It requires an exact match between label key and string value.
- Question 24Multiple Select
Which statements correctly describe regex matcher behavior in PromQL?
- APromQL follows RE2 syntax for regular expressions.Correct answer
- B=~ includes time series that match the provided pattern.Correct answer
- C!~ excludes time series that match the provided pattern.Correct answer
- DShell glob patterns are fully supported in PromQL regex matchers.
Why this is the answer
PromQL uses RE2 syntax, not shell globbing. =~ selects matching series, and !~ excludes them. Using * instead of .* is a common trap.
- Question 25Interactive
In the PromQL expression shown, which type of matcher is applied to the job label to match multiple API services?
- AEquality matcher
- BInequality matcher
- CRegex matcherCorrect answer
- DNegative regex matcher
Why this is the answer
The code uses =~, a regex matcher, to select jobs beginning with api-. It follows RE2 syntax and is efficient for grouping similar entities.
- Question 26Single Choice
Which aggregation operator counts the time series in a group instead of adding their values?
- Asum()
- Bcount()Correct answer
- Cavg()
- Dmax()
Why this is the answer
count() returns the number of time series in the group. Using sum() would add values, which is a common trap when counting active targets.
- Question 27Multiple Select
Which statements about by and without aggregation modifiers are correct?
- AAggregation without a by clause strips all labels from the result.Correct answer
- Bby specifies which labels to preserve in the aggregated output.Correct answer
- Cwithout preserves only the labels listed after it.
- DIf each selected series has value 1, sum() and count() return the same numeric result.Correct answer
Why this is the answer
Without by, all labels are erased; by preserves specified labels; without removes listed labels. Summing ones equals counting series because sum adds values and count counts series.
- Question 28Interactive
In the displayed PromQL query, what does the by (job) modifier do?
- AIt removes the job label from the result.
- BIt preserves the job label in the aggregated result.Correct answer
- CIt filters out every job except one.
- DIt converts the labels into a regular expression.
Why this is the answer
by specifies which labels to preserve after aggregation. Using by (job) keeps the job label while other labels are stripped away.
- Question 29Single Choice
Which PromQL function produces the average per-second rate from a counter over a range vector?
- Arate()Correct answer
- Birate()
- Cincrease()
- Ddelta()
Why this is the answer
rate() returns the average per-second increase over a range vector. irate() uses only the last two samples, while increase() reports total increase.
- Question 30Multiple Select
Which functions in PromQL are appropriate for analyzing counter metrics?
- Arate()Correct answer
- Birate()Correct answer
- Cincrease()Correct answer
- Ddelta()
Why this is the answer
rate(), irate(), and increase() are designed for counter metrics. delta() is meant for gauges, and using it on counters is generally inappropriate.
- Question 31Interactive
In the code block, why would applying rate() to a gauge metric be incorrect?
- AIt produces invalid rates because rate() is designed for monotonically increasing counters.Correct answer
- BIt returns exact raw values with no modification.
- CIt only fails if the gauge value is zero.
- DIt automatically converts the gauge to a counter.
Why this is the answer
rate() mathematically expects a monotonically increasing counter. Applying it to a gauge can produce arbitrary or misleading values, a fundamental PromQL trap.
- Question 32Single Choice
Which type of vector matching is used by default when applying arithmetic operators to two PromQL vectors?
- AOne-to-one matchingCorrect answer
- BMany-to-one matching
- CMany-to-many matching
- DCross product matching
Why this is the answer
Default one-to-one matching pairs series with identical label sets. Many-to-one matching requires group_left or group_right modifiers.
- Question 33Multiple Select
Which statements accurately describe how arithmetic operations work in PromQL?
- AArithmetic operations are applied element-wise to samples.Correct answer
- BBy default, both vectors must have exactly matching label sets.Correct answer
- Cgroup_left allows a right-hand series to be applied to multiple left-hand series.Correct answer
- DAll PromQL arithmetic is performed using 32-bit floating-point numbers.
Why this is the answer
Default one-to-one requires matching label sets. group_left enables many-to-one. PromQL uses 64-bit floating-point arithmetic, not 32-bit.
- Question 34Interactive
In the code block shown, what kind of label matcher is used on the status label?
- AEquality matcher
- BInequality matcher
- CRegex matcherCorrect answer
- DNegative regex matcher
Why this is the answer
The =~ operator is a regex matcher. The pattern 5.. selects status codes beginning with 5, such as 500 or 503, using RE2 syntax.
Prometheus Fundamentals
8 questions in this domain
- Question 35Single Choice
Which PromQL label matcher requires an exact match between the label key and the provided string value?
- A=~
- B=Correct answer
- C!=
- D!~
Why this is the answer
The equality matcher (=) requires an exact match between the label key and the provided string value, making it the most efficient and frequent selector.
- Question 36Multiple Select
Which of which of these are valid PromQL label matching operators?
- A=Correct answer
- B!=Correct answer
- C=~Correct answer
- D!~Correct answer
Why this is the answer
PromQL supports four label matching operators: equality (=), inequality (!=), regex match (=~), and negative regex match (!~).
- Question 37Interactive
Review the selector in the code block. What is true about its matching behavior?
- AIt matches any environment whose label contains the provided text.
- BIt requires an exact, case-sensitive match on the environment label.Correct answer
- CIt matches both lowercase and capitalized environment values.
- DIt treats the value as a regular expression pattern.
Why this is the answer
The equality matcher requires an exact match, and label matching in PromQL is case-sensitive, so only time series with the exact environment label value are returned.
- Question 38Single Choice
Which aggregation operator should be used to calculate the total bandwidth consumed across all instances in a fleet?
- AsumCorrect answer
- Bavg
- Ccount
- Dmax
Why this is the answer
The sum aggregation operator adds all values from the selected time series, which is appropriate for calculating total resource consumption.
- Question 39Multiple Select
Which statements about PromQL aggregation modifiers are correct?
- AThe by clause specifies which labels to preserve.Correct answer
- BThe without clause specifies which labels to remove from the result.Correct answer
- CAn aggregation with no by or without clause strips all labels from the result.Correct answer
- DUsing without on a label you want to keep will remove that dimension from the output.Correct answer
Why this is the answer
The by clause preserves specified labels, without removes specified labels, and omitting both strips all labels, which can accidentally remove desired dimensions.
- Question 40Interactive
What is the result of the expression shown in the code block?
- AThe total number of HTTP requests grouped by job, preserving only the job label.Correct answer
- BThe average number of HTTP requests per job.
- CThe maximum HTTP request count for each job.
- DThe count of time series for each job.
Why this is the answer
The sum aggregation adds request values, and the by (job) clause preserves only the job label in the resulting instant vector.
- Question 41Single Choice
Which aggregation operator identifies the lowest value within a group of time series?
- AminCorrect answer
- Bmax
- Csum
- Dcount
Why this is the answer
The min aggregation operator identifies the lowest value in a group of series, making it useful for monitoring minimum available resources.
- Question 42Multiple Select
Which statements are true about arithmetic operations in PromQL?
- AOperations apply element-wise to samples of the involved vectors.Correct answer
- BTwo vectors with different label sets produce an empty result unless matching modifiers are used.Correct answer
- CFunctions are evaluated before arithmetic operators are applied to their results.Correct answer
- DDividing by a series containing zero always produces a valid numeric result.
Why this is the answer
PromQL arithmetic is element-wise and requires matching label sets unless modifiers are used. Functions are evaluated first, and division by zero can produce NaN or +Inf.
Frequently asked questions
Everything about the Prometheus Certified Associate question bank and how to use it.