Courseiva

Prometheus Certified Associate (PCA, CNCF/Linux Foundation) (PCA) (PCA) — Questions 151–225

265 questions total · 4 pages · All types, answers revealed

Page 2

Page 3 of 4

Page 4
151
Multi-Selecthard

Which TWO of these are potential side effects of high-cardinality metrics?

Select 2 answers
A.High memory consumption on the Prometheus server.
B.Reduced CPU usage on target.
C.Faster alert evaluation.
D.Slow PromQL query execution times.
E.Decreased network bandwidth.
AnswersA, D

Every distinct label combination creates a separate time series, so high cardinality multiplies the series Prometheus must track. Each series consumes memory in the head block and index, driving up RAM usage on the server.

Why this answer

Memory exhaustion (OOM) and slow query performance are the direct results of high cardinality.

152
MCQmedium

An administrator wants to aggregate CPU usage across all nodes, keeping the instance label while summing the values. Which aggregation clause should be used?

A.sum(node_cpu_seconds_total) keeping (instance)
B.sum by (instance) (node_cpu_seconds_total)
C.sum(node_cpu_seconds_total) group by (instance)
D.sum without (instance) (node_cpu_seconds_total)
AnswerB

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.

Why this answer

The by clause specifies the labels that should be preserved in the aggregated result vector.

153
MCQmedium

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

A.topk(3, rate(process_cpu_seconds_total[5m]))
B.bottomk(3, rate(process_cpu_seconds_total[5m]))
C.topk(3, process_cpu_seconds_total[5m])
D.topk(rate(process_cpu_seconds_total[5m]), 3)
AnswerA

topk(3, ...) returns the three series with the highest instantaneous values, and wrapping rate() over the 5m range converts the cumulative counter process_cpu_seconds_total into a per-second CPU usage rate, satisfying the requirement to rank jobs by CPU consumption.

Why this answer

The correct PromQL structure is topk(3, rate(process_cpu_seconds_total[5m])). topk takes the instant-vector result of rate() over a 5-minute range vector and returns the 3 series with the highest values. The rate() function is required because process_cpu_seconds_total is a counter, and raw counter values would rank by total lifetime CPU rather than current usage.

Exam trap

PCA often tests whether candidates remember that topk requires an instant vector (so counters must be wrapped in rate()) and that the k argument comes first — reversing the arguments or passing a range vector are the classic wrong-answer traps.

How to eliminate wrong answers

Option B is wrong because bottomk returns the 3 lowest values, which is the opposite of what 'highest CPU usage' requires. Option C is wrong because process_cpu_seconds_total[5m] is a range vector, and topk requires an instant vector — passing a range vector directly causes a parse/type error, and it also fails to convert the counter to a rate. Option D is wrong because the argument order is reversed: topk's signature is topk(k, instant_vector), so topk(rate(...), 3) is invalid syntax.

154
MCQmedium

When evaluating a histogram metric, what does the special pseudo-label le represent in bucket time series?

A.The upper bound of the cumulative histogram bucket.
B.The linear extrapolation factor for summary metrics.
C.The logging event identifier for tracing.
D.The exact latency error margin of the measurement.
AnswerA

The `le` pseudo-label means "less than or equal to", recording each bucket's inclusive upper bound. This satisfies the stem's constraint by exposing the cumulative count of observations falling at or below that threshold, letting you compute per-bucket counts by subtracting adjacent series.

Why this answer

The le (less than or equal to) label represents the upper bound of a histogram bucket.

155
MCQmedium

Which aggregation operator would you use to calculate the total sum of a metric across all instances?

A.sum()
B.avg_over_time()
C.total()
D.count()
AnswerA

`sum()` aggregates a metric's samples across every matched instance into a single total, satisfying the requirement to calculate the overall sum. Unlike `avg()`, which divides by sample count, or `max()`/`min()`, which select extremes, `sum()` adds each instance's contribution, yielding the combined total across all instances.

Why this answer

The sum() aggregation operator in PromQL takes an instant vector and aggregates all matching time series into a single value by summing their current sample values. When applied across all instances of a metric (e.g., sum(node_cpu_seconds_total)), it produces the total across every series returned by the selector. This is exactly the semantics needed to compute a fleet-wide total of a metric.

Exam trap

The trap here is confusing aggregation operators (sum, count) with range functions (avg_over_time, rate) — candidates who see 'over all instances' may reflexively pick avg_over_time() because it sounds like it spans instances, when it actually spans time within one series.

How to eliminate wrong answers

Option B is wrong because avg_over_time() is a range-vector function that computes the average of a single time series over a time window, not an aggregation across multiple series. Option C is wrong because total() is not a valid PromQL operator — it does not exist in the language. Option D is wrong because count() counts the number of time series in the vector rather than summing their values, so it returns a cardinality, not a total.

156
MCQeasy

What is the purpose of the 'offset' modifier in a PromQL query?

A.To remove specific label dimensions.
B.To filter out noise from the last 5 minutes.
C.To change the time range of a query to a point in the past.
D.To increase the precision of a rate calculation.
AnswerC

The offset modifier shifts the evaluation instant backwards by the given duration, so errors_total offset 1h returns the value from one hour ago. This satisfies the scenario's requirement to query a point in the past.

Why this answer

The 'offset' modifier allows querying data from the past relative to the current time.

157
MCQeasy

Which PromQL aggregator should be used to count the total number of active time series matching a selector?

A.count(up)
B.sum(up)
C.len(up)
D.total(up)
AnswerA

count() is the aggregation operator that returns the number of series in each group, so count(up) yields the total active series matching the selector. sum() would add sample values instead of counting series, which does not satisfy the requirement.

Why this answer

The count operator counts the number of time series in an instant vector.

158
MCQhard

When setting up Alertmanager, what happens if you have no route defined for an alert?

A.The alert triggers an error
B.The alert is sent to the root route
C.The alert is sent to all receivers
D.The alert is dropped
AnswerB

Alertmanager's routing tree has a root node, and every alert enters there; without a matching child route, the alert inherits the root route's receiver and continues to be notified. This satisfies the question's scenario of an alert with no explicitly defined route.

Why this answer

If an alert matches no specific route, it will fall back to the root route of the configuration tree.

159
MCQhard

What is the purpose of the 'le' label in a Histogram?

A.Latency estimate
B.Less than or equal to
C.Logarithmic exponent
D.Last entry
AnswerB

In a Prometheus histogram, the `le` label defines each bucket's inclusive upper bound, so a bucket labelled `le="0.5"` counts every observation less than or equal to 0.5 seconds. This satisfies the stem's requirement by naming the comparison operator that determines which observations fall into each cumulative bucket.

Why this answer

The 'le' label stands for 'less than or equal to' and defines the upper bound of the histogram bucket.

160
Multi-Selecthard

Which THREE of the following are valid Alertmanager grouping parameters?

Select 3 answers
A.alert_timeout
B.group_by
C.group_interval
D.group_wait
E.resolve_delay
AnswersB, C, D

group_by is a core Alertmanager route parameter that partitions alerts into separate notification groups by label values, controlling which alerts are batched together. It directly satisfies the question's demand for a valid grouping parameter, alongside group_wait and group_interval.

Why this answer

In Alertmanager's configuration, the route block supports the grouping parameters group_by, group_wait, and group_interval, which is why options B, C, and D are correct. group_by (B) specifies the labels used to aggregate related alerts into a single notification, such as grouping by 'alertname' or 'cluster'. group_wait (D) sets how long Alertmanager waits to buffer alerts for the same group before sending the initial notification, defaulting to 30s. group_interval (C) defines how long to wait before sending a new notification about a group after the first one, defaulting to 5m. The unmarked options do not belong: alert_timeout (A) is not an Alertmanager parameter (timeouts appear in receivers like webhook or in Prometheus scrape configs), and resolve_delay (E) is not a valid Alertmanager grouping setting either.

Exam trap

PCA often tests the distinction between grouping parameters and other Alertmanager settings like resolve_timeout or repeat_interval, causing candidates to confuse similar-sounding but invalid options such as alert_timeout or resolve_delay.

161
MCQmedium

When writing a PromQL query involving a vector and a scalar, such as 'node_memory_free_bytes / (1024 * 1024)', how does Prometheus handle label matching?

A.The scalar operation is applied to every time series value in the vector independently, preserving all labels.
B.The operation is only applied to the first time series returned by the vector selector.
C.The scalar is matched against labels of the vector using exact label equality.
D.The query fails because scalars cannot be combined with vectors without an explicit 'on' clause.
AnswerA

Scalars carry no labels, so arithmetic between a vector and scalar applies element-wise to every sample, leaving the vector's label set untouched. This satisfies the stem's requirement that dividing by `(1024 * 1024)` converts bytes to mebibytes without dropping or altering any series identity.

Why this answer

Operations between an instant vector and a scalar are performed on each data point of the vector. Labels are unaffected.

162
MCQmedium

Which operator performs a set union in PromQL?

A.unless
B.join
C.or
D.and
AnswerC

The 'or' operator returns the union of two instant vectors, taking the left-hand series and adding any right-hand series whose label sets do not already match. 'and' and 'unless' perform intersection and complement instead, so they cannot produce a union.

Why this answer

In PromQL, the `or` operator performs a set union between two instant vectors, returning all series from the left-hand side plus any series from the right-hand side that do not already match on the label set. This is the PromQL equivalent of a SQL UNION, used to combine metrics from different sources into a single result set. The other logical operators (`and`, `unless`) perform intersection and set subtraction, not union.

Exam trap

PCA often tests the confusion between PromQL's set operators — candidates mix up `or` (union), `and` (intersection), and `unless` (subtraction), or mistakenly assume PromQL has a SQL-style `join` operator.

How to eliminate wrong answers

Option A is wrong because `unless` performs set subtraction — it returns series from the left-hand side that do NOT have a matching series on the right-hand side, which is the opposite of union. Option B is wrong because `join` is not a PromQL operator at all; PromQL does not have a SQL-style join keyword, and vector matching is handled implicitly by label sets during binary operations. Option D is wrong because `and` performs set intersection — it returns only series that exist on BOTH sides with matching labels, which is the opposite of union.

163
Multi-Selectmedium

Which TWO of the following are true regarding instant vectors?

Select 2 answers
A.They contain at most one sample per time series.
B.They do not support label filtering.
C.They contain data over a time range.
D.They can be passed directly to the rate() function.
E.They are the default result of a simple selector.
AnswersA, E

An instant vector holds one sample per time series at a single evaluation timestamp, unlike a range vector which holds many samples per series. This single-sample-per-series structure is the defining property that makes instant vectors suitable for instant queries and comparisons.

Why this answer

Option A is correct because an instant vector holds exactly one sample per time series at a single evaluation timestamp, which is the defining characteristic of an instant vector in PromQL. Option E is correct because a simple selector such as `http_requests_total` returns an instant vector by default, giving the most recent sample for each matching series at the evaluation time. Option B is wrong because instant vectors fully support label filtering through selectors and matchers like `{job="api"}`.

Option C is wrong because data over a time range describes a range vector, not an instant vector. Option D is wrong because `rate()` requires a range vector as its argument, not an instant vector.

164
MCQhard

What happens if a label set for a metric changes during its lifetime?

A.An error is logged
B.A new time series is created
C.The series is updated in-place
D.The metric is deleted
AnswerB

Changing a metric's label set alters its identity, so Prometheus treats it as a distinct series rather than mutating the existing one. The original series stops receiving samples and a new time series begins under the modified labels, satisfying the stem's constraint that label changes during a metric's lifetime create separate series.

Why this answer

Changing a label set creates a brand new time series in Prometheus.

165
MCQhard

An application is emitting logs that contain '5xx' status codes when a service is unavailable. If you want to create an alert that triggers based on the rate of these errors, what is the best practice for observability?

A.Expose a metric incrementing on every 5xx error and alert on the rate of that metric.
B.Alert directly on the log stream using a log aggregator.
C.Use Prometheus to scrape the log file directly.
D.Increase log verbosity to trace the request until the error is resolved.
AnswerA

Emitting a counter metric per 5xx error lets Prometheus apply rate() over the series, so alerting rules fire on error frequency rather than raw log volume. This satisfies the requirement to trigger on the rate of errors, which log-based alerting cannot express directly.

Why this answer

Logs are useful for root cause analysis, but for alerting on rates, you should convert the error occurrence into a metric increment, as metrics are more efficient for long-term calculation and alerting.

166
MCQmedium

You need to calculate the per-second rate of increase for a counter metric over the last 10 minutes. Which function is most appropriate?

A.rate(metric[10m])
B.increase(metric[10m])
C.irate(metric[10m])
D.delta(metric[10m])
AnswerA

rate() computes the per-second average rate of increase of a counter over the given range, handling counter resets and extrapolation at the range boundaries. The 10m range selector supplies the required window, yielding a per-second figure rather than a raw increase.

Why this answer

rate() is the standard function for calculating the per-second rate of increase over a range vector.

167
MCQmedium

When integrating Grafana with Prometheus, what is the standard authentication method if Prometheus is behind a reverse proxy?

A.Hardcoded IP address
B.Basic Auth
C.Public access only
D.SSH tunneling
AnswerB

Basic Auth is the standard mechanism: Grafana stores the username and password in the Prometheus data source configuration and sends them in the Authorization header, which the reverse proxy validates before forwarding requests to the Prometheus server.

Why this answer

When Prometheus sits behind a reverse proxy, Grafana's Prometheus data source authenticates to the proxy using HTTP Basic Auth — the data source configuration provides a username and password that Grafana sends in the Authorization header. This is the standard, documented method because the reverse proxy (nginx, Apache, Traefik) typically enforces Basic Auth in front of the Prometheus endpoint.

Exam trap

The trap is assuming Prometheus has built-in authentication and picking a network-layer option (IP, SSH) instead of recognizing that auth is delegated to the reverse proxy and Grafana uses Basic Auth to satisfy it.

How to eliminate wrong answers

Option A is wrong because hardcoding an IP address is not an authentication mechanism — IP allowlisting may be a supplementary control but does not authenticate Grafana to Prometheus. Option C is wrong because 'public access only' describes an unauthenticated exposure, which is the opposite of a secure integration and is not an authentication method. Option D is wrong because SSH tunneling is a transport-level workaround for reaching a private endpoint, not the standard authentication method Grafana uses against a reverse-proxied Prometheus.

168
MCQmedium

Why are 'logs' essential for debugging, even with perfect metrics?

A.Metrics are too slow.
B.Logs contain detailed context about specific events.
C.Logs are free to store.
D.Metrics cannot be used for debugging.
AnswerB

Logs capture discrete, timestamped events with full contextual detail — error messages, stack traces, request identifiers and variable values — that aggregated metrics cannot retain. Metrics reveal that a failure occurred; logs explain why, satisfying the need to diagnose specific incidents rather than merely detect anomalies.

Why this answer

Logs provide the granular, detailed context (like specific error messages or stack traces) that metrics cannot provide.

169
MCQmedium

A developer asks why they should use Distributed Traces instead of simply using high-cardinality metrics to debug a slow request. What is the primary advantage of traces?

A.Traces are natively generated by Prometheus.
B.Traces provide end-to-end request context across microservices.
C.Traces have lower storage requirements.
D.Metrics cannot be used for alerting.
AnswerB

Traces capture the full causal path of a single request as it propagates across microservices, preserving parent-child span relationships and per-hop timings. High-cardinality metrics aggregate values and cannot reconstruct that request-scoped journey, so traces uniquely satisfy the need for end-to-end context when debugging one slow request.

Why this answer

Distributed traces capture the full causal chain of a request as it flows through multiple microservices, including parent-child span relationships, timing, and metadata. This end-to-end context lets you pinpoint which service or span in a call graph introduced latency, which high-cardinality metrics alone cannot do because metrics aggregate and lose per-request causality.

Exam trap

PCA often tests whether candidates understand that traces provide per-request causality and context, while metrics are aggregated — the trap is picking 'lower storage' or 'Prometheus-native' answers that misrepresent how tracing works.

How to eliminate wrong answers

Option A is wrong because Prometheus does not natively generate traces — it is a metrics system; tracing requires OpenTelemetry, Jaeger, Tempo, or similar. Option C is wrong because traces typically have higher storage requirements than metrics due to per-request span data and sampling overhead. Option D is wrong because metrics are in fact the primary alerting signal in most observability stacks (e.g., Prometheus alerting rules).

170
MCQhard

You are performing a 'label_replace' operation. What is the correct syntax for a regex capture group?

A.\1
B.{1}
C.%1
D.$1
AnswerD

In Prometheus relabelling, `$1` references the first regex capture group, satisfying the `label_replace` requirement to extract and substitute a matched substring. The `replacement` field uses `$n` syntax, where `n` is the capture group index, so `$1` inserts the first parenthesised match into the target label.

Why this answer

Prometheus uses standard RE2 regex syntax, where capture groups are accessed via $1, $2, etc.

171
MCQhard

You are implementing a custom exporter for a legacy database. The database provides a single value representing the number of active connections. Which metric type should you use to best represent this data?

A.Gauge
B.Summary
C.Histogram
D.Counter
AnswerA

A gauge represents a value that can rise or fall arbitrarily over time, such as the current count of active connections. Counters only increase monotonically, so they cannot accurately reflect a connection total that decreases when sessions close.

Why this answer

Because active connections fluctuate up and down as users connect and disconnect, a Gauge is the appropriate metric type for representing a snapshot of the current state.

172
Multi-Selecthard

Which THREE factors contribute to a 'high cardinality' problem in a Prometheus environment?

Select 3 answers
A.Adding high-variance values like email addresses to labels.
B.Including a unique request ID in a label.
C.Adding full URL paths as labels including query parameters.
D.Using a low scrape interval.
E.Using too many scrape targets.
AnswersA, B, C

Email addresses are effectively unique per user, so each distinct value spawns its own time series. That unbounded label-value growth multiplies active series and index size, which is precisely the high-cardinality condition the stem asks about.

Why this answer

Options A, B, and C are correct because high cardinality in Prometheus is driven by labels whose value sets grow without bound, creating a distinct time series for every unique combination. A is right because high-variance values like email addresses produce a new series per user, exploding the index and memory footprint. B is right because a unique request ID makes essentially every request its own series, which is the classic cardinality anti-pattern.

C is right because full URL paths with query parameters multiply series by every distinct path and parameter combination, again unbounded growth. D is not correct because a low scrape interval only increases sample ingestion frequency and storage volume, not the number of distinct series. E is not correct because more scrape targets raise overall series count linearly, but cardinality problems come from high-variance label values, not merely from target quantity.

173
Multi-Selecteasy

Which THREE of the following are standard ways to send notifications from Alertmanager?

Select 3 answers
A.FTP
B.Webhook
C.SSH
D.Email
E.PagerDuty
AnswersB, D, E

Webhook receivers let Alertmanager POST a JSON payload to any HTTP endpoint, satisfying the requirement for a standard notification route. This is one of the built-in receiver types configured under `receivers:` in the Alertmanager configuration file, alongside email and Slack, requiring no external integration component.

Why this answer

Webhook, Email, and PagerDuty are built-in, widely used receiver types.

174
MCQmedium

You are troubleshooting high cardinality in your metrics. What is a common cause for this in a custom exporter?

A.Using too many different metrics.
B.Scraping the exporter too frequently.
C.Using the wrong metric type for a simple count.
D.Including dynamic values like IDs or timestamps in label values.
AnswerD

Labels form part of the metric's unique time series identity. Embedding unbounded dynamic values such as request IDs, user IDs or timestamps creates a new series per value, exploding cardinality and overwhelming the time-series database with memory and storage pressure.

Why this answer

High cardinality occurs when a label value has an unbounded number of unique values (like a request ID or a timestamp), causing a massive explosion in the number of unique time series.

175
MCQeasy

In the context of the Four Golden Signals, what does 'Saturation' measure?

A.The number of 5xx errors.
B.The amount of queued work.
C.The speed of the network.
D.The number of successful requests.
AnswerB

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.

Why this answer

Saturation is one of the Four Golden Signals (latency, traffic, errors, saturation) and measures how 'full' a resource is — the portion of a resource's capacity being consumed, with queued work being the classic indicator. High queue depth signals the resource (CPU, memory, disk I/O, network) is approaching its limit and will soon degrade latency or drop requests.

Exam trap

The trap is conflating Saturation with Errors or Traffic — candidates often pick '5xx errors' because both feel like 'something is wrong,' but errors are a separate golden signal.

How to eliminate wrong answers

Option A is wrong because 5xx errors map to the 'Errors' signal, not Saturation. Option C is wrong because network speed is a capacity attribute, not a saturation measurement; saturation would be measured as bandwidth utilization relative to link capacity. Option D is wrong because successful request count is the 'Traffic' signal (requests per second), not saturation.

176
MCQeasy

Which of these is NOT a valid Alertmanager receiver type?

A.Webhook
B.Email
C.SQL
D.PagerDuty
AnswerC

Alertmanager supports receivers such as email, Slack, PagerDuty, webhook and Opsgenie for delivering notifications. SQL is a database technology, not a notification integration, so it cannot be configured as a valid receiver type in the Alertmanager routing configuration.

Why this answer

While Alertmanager supports many integrations (Webhook, Email, PagerDuty), 'SQL' is not a native built-in receiver type.

177
MCQeasy

What is the purpose of the 'labels' field in an alerting rule?

A.To define the alert message body
B.To add metadata for routing and filtering
C.To select the target server
D.To set the alert severity level
AnswerB

Labels attach key-value metadata to an alert, which Alertmanager matches against routes, silences and inhibition rules to determine where and whether notifications are delivered. This satisfies the stem's routing and filtering requirement, distinguishing labels from annotations, which only carry descriptive text.

Why this answer

Labels allow you to attach metadata to the alert, which can then be used in Alertmanager for routing and grouping.

178
MCQmedium

In the Prometheus data model, what is a 'sample'?

A.The metric name
B.A label key-value pair
C.A value and a timestamp
D.An alert rule
AnswerC

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.

Why this answer

A sample is a value-timestamp pair associated with a specific series.

179
MCQhard

You notice that your Prometheus instance memory usage is growing linearly despite constant traffic. What is the most likely cause?

A.CPU throttling.
B.Network latency.
C.Increasing metric cardinality.
D.Too many alert rules.
AnswerC

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.

Why this answer

If cardinality (unique label combinations) increases over time, the number of active time series keeps growing, increasing RAM usage.

180
Multi-Selectmedium

Which TWO statements accurately describe the differences between logs and metrics?

Select 2 answers
A.Logs are stored as numerical counters.
B.Metrics are better suited for full-text search.
C.Metrics have higher storage costs per data point.
D.Metrics are best for tracking aggregate trends over time.
E.Logs are ideal for debugging specific, individual request failures.
AnswersD, E

Metrics are numeric, aggregated and cheap to store, making them suited to dashboards and trend analysis over time. Logs capture individual discrete events with rich context, better for debugging specific incidents. This aggregate-versus-event axis is the defining difference.

Why this answer

Option D is correct because metrics are numeric time-series values (counters, gauges, histograms) that are aggregated and sampled at intervals, making them ideal for dashboards and alerting on aggregate trends over time, such as average latency or request rate. Option E is correct because logs capture discrete, detailed event records with full context (timestamps, error messages, stack traces, request IDs), which is exactly what you need to debug a specific individual request failure. Option A is wrong because logs are stored as text or structured event records, not numerical counters; numerical counters are the domain of metrics.

Option B is wrong because full-text search is a log-oriented capability, whereas metrics are numeric and queried by aggregation functions rather than text search. Option C is wrong because metrics are typically far cheaper to store per data point than logs, since metrics are compact numeric samples while logs contain verbose text payloads.

Exam trap

PCA often tests whether candidates can distinguish the strengths of logs vs. metrics — particularly that metrics are for aggregate trends and logs for individual event debugging — and whether they mistakenly attribute full-text search or low storage cost to metrics.

181
MCQeasy

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

A.http_requests_total{environment=~"^((?!production).)*$"}
B.http_requests_total{environment!="production"}
C.http_requests_total{environment!~"production"}
D.http_requests_total{environment!^"production"}
AnswerB

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.

Why this answer

The != operator is the standard negative equality matcher in PromQL label selectors.

182
MCQeasy

What is the default retention period for Prometheus data?

A.1 year
B.30 days
C.15 days
D.7 days
AnswerC

Prometheus retains scraped samples for 15 days by default, after which the oldest blocks are deleted. This satisfies the stem's constraint because no explicit retention flag is required; the default applies unless overridden via storage.tsdb.retention.time.

Why this answer

The default retention for local Prometheus storage is 15 days.

183
Multi-Selectmedium

Which THREE of the following functions are specifically designed to be used with range vectors? (Choose THREE)

Select 3 answers
A.delta
B.abs
C.rate
D.sum
E.increase
AnswersA, C, E

Delta computes the difference between a sample and its predecessor, so it requires a range vector to supply that historical window; instant vectors hold only one value per series and cannot feed it. This satisfies the stem's requirement for functions designed specifically around range vectors.

Why this answer

delta (A) is designed for range vectors because it computes the difference between the first and last sample values in each time series over the range, which is meaningful only when a range vector is supplied. rate (C) is also range-vector specific: it calculates the per-second average rate of increase of a counter over the range window, requiring multiple samples from a range vector. increase (E) likewise operates on range vectors, returning the total increase of a counter over the given range by extrapolating from the samples within that window. In contrast, abs (B) is a simple instant-vector function that returns the absolute value of each sample and does not need a range, while sum (D) is an aggregation operator that reduces an instant vector across labels and is not tied to range-vector semantics.

Exam trap

PCA often tests whether candidates can distinguish range-vector functions (rate, increase, delta, irate, idelta) from instant-vector functions (abs, ceil, floor) and aggregation operators (sum, avg, topk) — the trap is picking a math or aggregation function that sounds like it operates over time.

184
MCQmedium

What is the primary function of the 'blackbox_exporter' in a monitoring architecture?

A.Database performance
B.Endpoint probing
C.Log aggregation
D.Hardware monitoring
AnswerB

Blackbox_exporter performs active probing of endpoints over HTTP, HTTPS, DNS, TCP and ICMP, returning metrics such as response time, status code and TLS certificate expiry. This satisfies the stem's requirement for the primary function, since it monitors externally observable behaviour rather than internal host metrics.

Why this answer

It allows monitoring of endpoints from the outside (blackbox perspective) rather than the inside (whitebox instrumentation).

185
Multi-Selecteasy

Which TWO of the following are valid metric types natively supported by Prometheus? (Choose TWO)

Select 2 answers
A.Matrix
B.Gauge
C.Counter
D.Vector
E.Scalar
AnswersB, C

Gauge is one of Prometheus's four native metric types, representing a value that can rise or fall arbitrarily, such as temperature or memory usage. It is exposed through client libraries and stored directly in the time series database.

Why this answer

Prometheus natively supports four core metric types: Counter, Gauge, Histogram, and Summary. Option B (Gauge) is correct because a gauge represents a single numerical value that can arbitrarily go up and down, such as current memory usage or temperature. Option C (Counter) is correct because a counter is a cumulative metric that only increases (or resets to zero on restart), such as the total number of HTTP requests served.

The other options are not valid Prometheus metric types: Matrix, Vector, and Scalar are PromQL data types (instant vector, range vector, scalar, string) used in query expressions, not metric types exposed by instrumented targets.

186
Multi-Selectmedium

Which TWO of the following are true about the Pushgateway?

Select 2 answers
A.It is a drop-in for standard scraping
B.It stores metrics persistently
C.It automatically expires metrics
D.Metrics must be deleted manually
E.It is for batch jobs
AnswersD, E

Pushgateway retains pushed metrics indefinitely, so stale series from terminated batch jobs persist until removed via the API or by deleting the entire group. This satisfies the scenario's requirement to identify genuine Pushgateway behaviour: unlike pull-based exporters, no scrape-based expiry or automatic garbage collection occurs.

Why this answer

Option D is correct because the Pushgateway never expires or garbage-collects pushed metrics on its own; pushed time series persist until they are explicitly removed, typically with an HTTP DELETE to a path such as /metrics/job/<job> (or via the pushgateway's admin API), so operators must delete stale metrics manually. Option E is correct because the Pushgateway exists specifically for short-lived, batch, or cron-style jobs that cannot be scraped reliably during their brief runtime; such jobs push their final metrics to the gateway, which then exposes them for Prometheus to scrape. Option A is wrong because the Pushgateway is not a drop-in replacement for standard scraping: it only holds pushed metrics and cannot discover or scrape targets, and it lacks the full semantics of a normal Prometheus scrape target.

Option B is wrong because the Pushgateway is not a persistent metrics store; it keeps pushed metrics in memory and loses them on restart, with persistence being Prometheus's role. Option C is wrong because the Pushgateway does not automatically expire metrics; there is no built-in TTL, which is exactly why manual deletion is required.

187
Multi-Selecthard

Which TWO are common causes of high-cardinality in Kubernetes environments?

Select 2 answers
A.Using a deployment name label.
B.Using a unique transaction ID as a label.
C.Using the pod name in a metric label.
D.Using a cluster region label.
E.Using a service name label.
AnswersB, C

A unique transaction ID label creates a new time series for every transaction, so cardinality grows without bound as traffic increases. This directly satisfies the stem's high-cardinality cause, since Prometheus indexes each distinct label combination separately in its TSDB.

Why this answer

High cardinality occurs when a metric label takes on a very large number of distinct values, multiplying the number of time series. Option B is correct because a unique transaction ID as a label creates a new series for every transaction, producing unbounded cardinality. Option C is correct because the pod name in a metric label changes with every pod restart or rollout, generating a new series per pod instance and causing cardinality to grow continuously.

Options A, D, and E are not common causes of high cardinality: deployment names, cluster regions, and service names are relatively stable, low-cardinality dimensions with a limited set of values.

188
MCQeasy

When using a Prometheus client library to instrument a Go application, which function call is typically used to register a new metric?

A.exporter.Start()
B.server.Listen()
C.client.InitMetric()
D.prometheus.MustRegister()
AnswerD

prometheus.MustRegister() registers a collector with the default registry and panics on error, which is the idiomatic call in Go client libraries. It ensures the metric is exposed on the /metrics endpoint without requiring explicit error handling.

Why this answer

In Prometheus client libraries for Go, the prometheus.MustRegister() function is used to register a new metric with the default registry. It panics if the registration fails, ensuring that metrics are properly registered at startup. This is the typical way to make metrics available for scraping.

Exam trap

PCA often tests Prometheus client library usage, and candidates may confuse registration functions with other initialization calls, but MustRegister is the standard for registering metrics in Go.

How to eliminate wrong answers

Option A is wrong because exporter.Start() is not a standard function in Prometheus client libraries; it might be confused with starting an exporter, but it's not used for metric registration. Option B is wrong because server.Listen() is not a Prometheus client function; it might refer to starting an HTTP server, but not for registering metrics. Option C is wrong because client.InitMetric() is not a real function; it's a fictitious name that sounds plausible but does not exist in the Prometheus Go client.

189
MCQeasy

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

A.Operators are evaluated strictly from left to right regardless of type.
B.Operators are evaluated strictly from right to left.
C.Multiplication has higher precedence than addition.
D.Addition has higher precedence than multiplication.
AnswerC

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.

Why this answer

PromQL follows standard mathematical order of operations, where multiplication and division take precedence over addition and subtraction.

190
MCQeasy

What is 'Monitoring Philosophy' regarding alerts?

A.Alert on every CPU spike.
B.Alert on symptoms, not causes.
C.Only alert during business hours.
D.Alert on every error log.
AnswerB

Alerting on causes (CPU, disk) fires on conditions users may never feel. Symptom-based alerts target observable service degradation, such as elevated error rates or latency, so pages reflect actual user impact and reduce noise from transient internal fluctuations.

Why this answer

The 'Monitoring Philosophy' in Google Cloud's operations suite (formerly Stackdriver) emphasizes alerting on symptoms—user-visible issues like high latency or error rates—rather than on causes such as CPU spikes or disk I/O. This approach reduces alert noise and focuses on what actually impacts users, aligning with SRE principles. By alerting on symptoms, you avoid false positives from normal fluctuations and ensure that alerts are actionable and tied to service level objectives (SLOs).

Exam trap

PCA often tests the distinction between symptom-based and cause-based alerting, and candidates may mistakenly choose to alert on every CPU spike or error log because they confuse monitoring data with actionable alerts.

How to eliminate wrong answers

Option A is wrong because alerting on every CPU spike generates excessive noise and often flags normal, transient behavior that doesn't affect users, leading to alert fatigue. Option C is wrong because restricting alerts to business hours ignores critical issues that can occur at any time and contradicts the need for continuous monitoring in cloud environments. Option D is wrong because alerting on every error log is impractical; many errors are benign or expected, and this would overwhelm operators with non-actionable notifications.

191
MCQmedium

When using the 'scrape_timeout', what happens if the timeout is reached?

A.It automatically retries once
B.The previous value is kept indefinitely
C.The scrape continues silently
D.The scrape is marked as failed
AnswerD

When a scrape exceeds scrape_timeout, Prometheus aborts the HTTP request and records the target as down, incrementing up=0 and scrape failure metrics. The sample set is discarded, so the scrape is marked failed rather than partially ingested.

Why this answer

If the timeout is reached, the scrape is aborted, and a 'up{job=...} == 0' metric is recorded.

192
MCQmedium

Which function is used to convert a counter rate into a per-second rate over a time range?

A.rate()
B.delta()
C.increase()
D.sum()
AnswerA

`rate()` calculates the per-second average rate of increase of a counter over a specified range, handling counter resets and extrapolating to the range boundaries. This directly satisfies the stem's requirement to convert a monotonically increasing counter into a per-second rate, unlike `irate()`, which uses only the last two samples.

Why this answer

rate() is the standard function for per-second rates of counters.

193
Multi-Selecthard

Which THREE of the following are common issues that cause scraping failures?

Select 3 answers
A.Lack of data in the database
B.Network connectivity issues
C.Too many dashboards in Grafana
D.Exporter timing out
E.Invalid scrape configuration
AnswersB, D, E

Scraping requires the Prometheus server to reach the target's metrics endpoint over the network. Firewalls, DNS failures, routing problems or unreachable hosts prevent the HTTP request completing, so the scrape fails outright. This satisfies the stem's requirement for a common scraping failure cause.

Why this answer

Network connectivity issues (B) are a common cause of scrape failures because Prometheus cannot reach the target's /metrics endpoint when DNS resolution, routing, firewall rules, or TLS handshakes fail, resulting in an 'up=0' or 'context deadline exceeded' error. Exporter timing out (D) is correct because if the exporter takes longer to respond than the configured scrape_timeout (default 10s), Prometheus aborts the scrape and records the target as down. Invalid scrape configuration (E) is correct because malformed YAML, an incorrect scrape_config, a bad relabeling rule, or a wrong metrics_path/targets entry prevents Prometheus from scraping the intended targets at all.

Lack of data in the database (A) is not a scraping failure — it is a downstream symptom or a querying concern, not a cause of the scrape itself failing. Too many dashboards in Grafana (C) is irrelevant to scraping, since Grafana is a visualization layer that queries Prometheus and does not participate in the scrape cycle.

Exam trap

PCA often tests whether candidates confuse Grafana dashboard issues with Prometheus scrape failures, so distractors about dashboards or databases are common traps.

194
Multi-Selectmedium

Which THREE of the following are valid components within a Prometheus Alerting Rule file?

Select 3 answers
A.expr
B.receiver
C.groups
D.alert
E.routing_tree
AnswersA, C, D

The `expr` field holds the PromQL expression that Prometheus evaluates on each evaluation interval; when the result is non-empty, the alert transitions to pending or firing. It is mandatory in every alerting rule, satisfying the stem's requirement for a valid component of an Alerting Rule file.

Why this answer

Prometheus alerting rules contain a 'groups' array, which contains individual 'rules' (alerts or recordings), and each alert rule must have an 'alert' name and 'expr'.

195
MCQmedium

What is the recommended approach for metrics that only need to be exposed periodically?

A.Only export when changing
B.Expose consistently
C.Use Pushgateway
D.Delete the metric
AnswerB

Prometheus scrapes targets on a fixed interval, so metrics must be exposed consistently rather than only when they change. Continuously exposing the current value lets each scrape capture the state, satisfying the periodic-exposure requirement without gaps.

Why this answer

The recommended approach is to expose metrics consistently, because Prometheus is a pull-based system that scrapes targets at fixed intervals regardless of whether the underlying value has changed. Consistently exposing the metric ensures that every scrape returns a current value, preserving continuity in the time series and enabling reliable rate(), delta(), and alerting calculations. Intermittent exposure creates gaps that break PromQL functions and trigger false staleness.

Exam trap

PCA often tests the misconception that metrics should only be exported when they change, confusing Prometheus's pull-based model with push-based or event-driven systems — candidates who think 'only send on change' is efficient fall into the trap.

How to eliminate wrong answers

Option A is wrong because only exporting when the value changes violates Prometheus's pull model — scrapes between changes would return nothing, creating gaps in the time series and causing rate() and increase() to produce incorrect results. Option C is wrong because Pushgateway is intended for short-lived batch jobs that cannot be scraped, not for periodically-changing metrics from long-running services; using it for a scrapeable target adds unnecessary complexity and stale-metric risk. Option D is wrong because deleting a metric removes its time series entirely, losing historical data and breaking dashboards and alerts that depend on it.

196
Multi-Selectmedium

Which THREE of the following are valid aggregation operators in PromQL? (Choose THREE)

Select 3 answers
A.median
B.average
C.stddev
D.sum
E.topk
AnswersC, D, E

stddev is a valid PromQL aggregation operator, computing the standard deviation across the grouped sample values. It accepts a by or without clause and operates over an instant vector, matching the aggregation requirement in the stem.

Why this answer

In PromQL, the aggregation operators are applied with syntax like <aggr-op>([parameter,] <vector expression>) [without|by (...)], and the valid set includes stddev, sum, and topk. Option C (stddev) is correct because stddev is a built-in aggregation operator that computes the standard deviation across the aggregated time series. Option D (sum) is correct because sum is a core aggregation operator that adds the values of all matched series.

Option E (topk) is correct because topk is a parameterized aggregation operator that returns the k series with the highest values. Options A (median) and B (average) are not valid PromQL aggregation operators; the average is expressed as sum(...) / count(...), and median is not provided as an aggregation operator in PromQL.

197
Multi-Selecthard

Which THREE of the following are required to expose a new metric in an application?

Select 3 answers
A.Enable remote write
B.Configure Alertmanager
C.Register the metric
D.Expose an /metrics endpoint
E.Define a metric
AnswersC, D, E

Registering the metric with the OpenTelemetry meter provider creates the instrument the application emits values through, satisfying the requirement to expose a new metric. Without a registered instrument, recorded measurements have no defined name, type or unit, so no metric is exported to the backend.

Why this answer

To expose a new metric in an application, you must first define the metric (E) by declaring it in code with a name, type (counter, gauge, histogram, or summary), and help text, since no metric can be collected without a declared instrument. Next, you must register the metric (C) with the application's metrics registry (e.g., Prometheus's default registry or a custom CollectorRegistry) so the instrumentation library knows to track and report it. Finally, you must expose an /metrics endpoint (D) over HTTP so the Prometheus server can scrape the registered metric values in the standard text exposition format.

Enabling remote write (A) is a Prometheus server-side feature for forwarding scraped samples to a remote storage system and is not needed to expose a metric from the application itself. Configuring Alertmanager (B) is only for routing and sending alerts based on alerting rules, which is unrelated to the mechanics of exposing a metric.

Exam trap

The trap is including remote write or Alertmanager as necessary steps; candidates must distinguish between exposing metrics and other Prometheus ecosystem functions.

198
Multi-Selectmedium

Which THREE of the following are valid metric types in Prometheus?

Select 3 answers
A.Gauge
B.Set
C.Counter
D.Histogram
E.Queue
AnswersA, C, D

Gauges represent a single numerical value that can arbitrarily increase or decrease, such as temperature or current memory usage. Prometheus exposes this as a valid metric type, satisfying the question's requirement for three valid types alongside counter and histogram.

Why this answer

Prometheus defines exactly four core metric types, and three of them appear here. Option A, Gauge, is correct because a gauge represents a value that can arbitrarily go up or down, such as temperature or current memory usage. Option C, Counter, is correct because a counter is a cumulative metric that only increases (or resets to zero on restart), typically used for counts like total requests served.

Option D, Histogram, is correct because a histogram samples observations and counts them into configurable buckets, exposing _bucket, _sum, and _count series for distributions and quantile estimation. Option B, Set, is not a Prometheus metric type; it is not part of the client library metric primitives (the fourth valid type is Summary, which is absent here). Option E, Queue, is also not a metric type; it is merely a data structure concept and has no corresponding Prometheus instrumentation primitive.

Exam trap

PCA often tests the exact four metric types, planting plausible-sounding distractors like 'Set' and 'Queue' that resemble data structures but are not part of the Prometheus client library's type system.

199
MCQhard

Why does the 'rate()' function in PromQL behave unexpectedly on counter resets?

A.It returns an error.
B.It requires a manual offset.
C.It detects the reset and ignores the wrap-around.
D.It stops recording the metric.
AnswerC

Counters reset to zero on restart, so raw deltas go negative. PromQL's rate() detects the reset and treats the drop as a wrap-around, extrapolating the increase across the interval rather than reporting a spurious negative slope, which would otherwise distort the per-second average.

Why this answer

PromQL's rate() function is specifically designed to handle counter resets: when a counter decreases (indicating a process restart or counter wrap), rate() treats the drop as a reset and extrapolates the increase across the interval, effectively ignoring the wrap-around. This is why rate() is the recommended way to compute per-second rates on counters, rather than using deriv() or manual subtraction. The function assumes the counter only increases between resets and compensates accordingly.

Exam trap

PCA often tests the misconception that rate() fails or errors on counter resets, when in fact reset handling is its core design feature — candidates confuse rate() with raw subtraction or deriv().

How to eliminate wrong answers

Option A is wrong because rate() does not return an error on counter resets — it is explicitly built to handle them gracefully. Option B is wrong because no manual offset is required; rate() automatically accounts for resets within the lookback window. Option D is wrong because a counter reset does not stop Prometheus from recording the metric — the exporter continues exposing the counter, and Prometheus continues scraping it; only the value drops to zero or a lower number.

200
MCQeasy

Which tool allows you to visualize Prometheus alerts directly in a web UI?

A.Node Exporter
B.Alertmanager UI
C.Pushgateway
D.Prometheus CLI
AnswerB

The Alertmanager UI is a built-in web interface served by Alertmanager itself, showing active alerts, silences and grouping state. It satisfies the stem because Prometheus's own expression browser does not display fired alerts in this way.

Why this answer

Alertmanager ships with a built-in web UI (typically served on port 9093) that displays active alerts, silences, and grouping status, allowing operators to visualize and manage alerts directly. It is the canonical tool for inspecting which alerts are firing, which are silenced, and how they are grouped before notification. The Prometheus server's own UI shows firing alerts via the /alerts endpoint, but the Alertmanager UI is the dedicated interface for alert lifecycle management.

Exam trap

The trap is assuming Prometheus itself provides the alert visualization UI — while Prometheus shows firing alerts at /alerts, the dedicated alert management UI belongs to Alertmanager, and candidates often confuse the two components.

How to eliminate wrong answers

Option A is wrong because Node Exporter is a metrics exporter that exposes host-level metrics (CPU, memory, disk) on /metrics; it has no UI for alerts. Option C is wrong because Pushgateway is a component for short-lived jobs to push metrics to Prometheus; it exposes a minimal web interface for inspecting pushed metrics, not alerts. Option D is wrong because Prometheus CLI (promtool) is a command-line utility for validating configs and querying metrics — it is not a web UI and does not visualize alerts.

201
MCQeasy

Which regular expression matcher selects all time series where the status label begins with the digit 5?

A.http_requests_total{status=@"5*"}
B.http_requests_total{status=~"^5.*"}
C.http_requests_total{status=^"5"}
D.http_requests_total{status=~"5$"}
AnswerB

The =~ operator applies RE2 regular expression matching, and the anchored pattern ^5.* requires the status label value to begin with the digit 5, matching any trailing characters. This selects exactly the time series whose status starts with 5.

Why this answer

The =~ operator combined with a regular expression starting with ^5 matches labels beginning with 5.

202
Multi-Selectmedium

Which TWO of the following statements about 'rate' vs 'irate' are correct?

Select 2 answers
A.irate() returns the average over the whole window.
B.rate() is better for alerting on slow-moving counters.
C.irate() is better for long-term trends.
D.irate() calculates the rate based on the last two points.
E.rate() only works on gauges.
AnswersB, D

Rate() suits alerting on slow-moving counters because it extrapolates across the full lookback window, producing a stable per-second average even when few samples exist. Irate() uses only the last two raw samples, so sparse counters yield erratic, spiky values that trigger false alerts. This satisfies the stem's slow-moving constraint.

Why this answer

Option B is correct because rate() averages the per-second increase across the entire range window, which smooths out short-lived spikes and counter resets, making it more suitable for alerting on slow-moving counters where a stable, representative value is desired. Option D is correct because irate() computes the instantaneous per-second rate using only the last two samples within the range vector, which makes it highly responsive to recent changes. Options A and C are incorrect because they swap the behaviors: irate() does not average over the whole window (that is rate()), and irate()'s volatility makes it poorly suited for long-term trend analysis, for which rate() is preferred.

Option E is incorrect because rate() is designed for counters, not gauges; applying it to gauges produces meaningless results since gauges can decrease arbitrarily.

Exam trap

PCA often tests the confusion between rate() and irate() — candidates mistakenly believe irate() averages over the window or that rate() works on gauges, when the opposite is true.

203
MCQhard

How does Prometheus handle subqueries embedded within an instant query, such as rate(http_requests_total[5m])[30m:1m]?

A.It caches the inner query results in memory for 30 minutes.
B.It increases the global scrape interval to 1 minute for the next 30 minutes.
C.It runs the inner instant query at multiple evaluation timestamps over the specified range at the given resolution, returning a range vector.
D.It converts the range vector into a scalar through statistical interpolation.
AnswerC

Prometheus evaluates the inner expression independently at each step across the 30-minute window, spaced at the 1-minute resolution, producing a range vector. This satisfies the subquery's requirement to apply an instant-vector function over time, which a plain range selector cannot do.

Why this answer

Prometheus evaluates subqueries by running the inner instant query at each step of the outer range, using the specified resolution (1m) and range (30m). This produces a range vector that can then be used by outer functions like rate(). The subquery syntax [30m:1m] means evaluate the inner expression over the last 30 minutes at 1-minute intervals.

Exam trap

PCA often tests the misconception that subqueries cache results or modify scrape intervals, when in fact they simply perform multiple evaluations of the inner query.

How to eliminate wrong answers

Option A is wrong because Prometheus does not cache subquery results in memory; it evaluates them on the fly. Option B is wrong because subqueries do not alter the global scrape interval; scrape intervals are configured per job. Option D is wrong because subqueries return a range vector, not a scalar; no statistical interpolation is performed.

204
Multi-Selecteasy

Which THREE features are provided by Grafana when used with Prometheus?

Select 3 answers
A.Customizable dashboard visualization.
B.Integration with alert notification channels.
C.Dashboard templating with variables.
D.Long-term storage of metrics.
E.Automatic code deployment.
AnswersA, B, C

Grafana supplies the visualisation layer Prometheus lacks natively, rendering its time-series data into configurable panels, graphs and dashboards. This satisfies the stem's requirement for a dashboarding feature, since Prometheus itself offers only basic expression-browser graphing rather than persistent, shareable, customisable dashboards.

Why this answer

Grafana provides customizable dashboard visualization (A), letting you build panels with graphs, gauges, tables, and heatmaps that query Prometheus via its data source and PromQL. It also provides integration with alert notification channels (B), where Grafana alert rules (or Prometheus Alertmanager routed into Grafana) can send notifications through channels such as email, Slack, PagerDuty, or webhooks. Dashboard templating with variables (C) is another Grafana feature, enabling reusable dashboards where variables like $instance or $job dynamically filter PromQL queries across panels.

Long-term storage of metrics (D) is not provided by Grafana; that is Prometheus's role (with remote storage or Thanos/Cortex for extended retention), while Grafana is only a visualization/alerting front end. Automatic code deployment (E) is unrelated to Grafana, being the domain of CI/CD tools such as Jenkins, GitLab CI, or Argo CD.

205
Multi-Selecthard

Which THREE built-in functions in PromQL are designed specifically to analyze changes over time for gauge metrics? (Choose three)

Select 3 answers
A.delta()
B.rate()
C.deriv()
D.increase()
E.predict_linear()
AnswersA, C, E

delta() computes the difference between the first and last sample values within a range vector, showing absolute change for a gauge over the window. It satisfies the stem's requirement for a function analysing gauge changes over time.

Why this answer

delta() is correct because it computes the difference between the first and last sample values of a gauge over a specified range, directly measuring change over time. deriv() is correct because it calculates the per-second derivative of a gauge using simple linear regression, quantifying the rate of change of the gauge's value. predict_linear() is correct because it applies linear regression over a gauge's range to extrapolate future values, which is inherently a time-based change analysis for gauges. rate() and increase() are not correct here because they are designed for counters, not gauges — rate() computes the per-second average rate of increase of a counter, and increase() computes the total counter increase over a range, both of which assume monotonically increasing counter semantics.

206
Multi-Selecthard

Which TWO of the following statements regarding PromQL subqueries are correct? (Choose two)

Select 2 answers
A.Subqueries execute faster than standard instant queries because they bypass the storage engine.
B.Subqueries allow instant vector queries to be passed as range vector inputs to functions like max_over_time().
C.Subqueries have syntax in the form 'expression[range:resolution]'.
D.Subqueries can only be executed against range vectors, never instant vectors.
E.The resolution parameter in a subquery is mandatory.
AnswersB, C

Subqueries bridge the gap between instant and range vectors: wrapping an instant vector expression in brackets with a range gives functions like max_over_time() the range vector input they require, which a bare instant vector cannot supply.

Why this answer

Option B is correct because a PromQL subquery wraps an instant vector expression and evaluates it over a time range, producing a range vector that can be fed into range-vector functions such as max_over_time(), avg_over_time(), or rate(). Option C is correct because the subquery syntax is exactly <instant_query>[<range>:<resolution>], for example max_over_time(rate(http_requests_total[5m])[1h:1m]). Option A is wrong because subqueries do not bypass the storage engine; they still query TSDB data and typically add overhead by evaluating the inner expression at each resolution step.

Option D is wrong because subqueries operate on instant vector expressions (the inner expression must return an instant vector), not exclusively on range vectors. Option E is wrong because the resolution parameter is optional; when omitted, Prometheus uses the global evaluation_interval as the default step.

207
MCQeasy

Which metric type is most appropriate for tracking the current total number of active user sessions?

A.Gauge
B.Summary
C.Counter
D.Histogram
AnswerA

A gauge records a value that can rise or fall arbitrarily at any moment, such as the current count of active sessions. Counters only increase or reset, histograms and summaries track distributions of observations, so neither represents an instantaneous fluctuating total.

Why this answer

Since the count of active sessions can rise and fall, a gauge is the correct metric type.

208
MCQmedium

You have a recording rule named 'job:node_cpu:avg_rate_5m'. Where is this metric stored once the rule is executed?

A.In the Prometheus TSDB
B.In the Alertmanager memory
C.In the Grafana database
D.In a local flat file
AnswerA

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.

Why this answer

Recording rules in Prometheus evaluate a PromQL expression on a schedule and write the resulting samples back into the Prometheus TSDB as new time series. The metric 'job:node_cpu:avg_rate_5m' is therefore stored in the same local TSDB as scraped metrics, queryable via PromQL like any other series. This is the core purpose of recording rules: precomputing expensive queries for faster dashboards and alerts.

Exam trap

The PCA exam often tests the misconception that recording rule output goes somewhere other than the Prometheus TSDB — candidates may assume Alertmanager or Grafana stores it, when in fact it's written back into Prometheus itself.

How to eliminate wrong answers

Option B is wrong because Alertmanager only receives firing alerts from Prometheus and handles routing, grouping, and silencing — it does not store recording rule output. Option C is wrong because Grafana is a visualization layer that queries Prometheus; it has its own database for dashboards and users, not for metric samples. Option D is wrong because Prometheus does not write recording rule results to a local flat file — all samples, scraped or computed, go into the TSDB blocks.

209
Multi-Selecteasy

Which THREE of these are common Prometheus data sources?

Select 3 answers
A.Static configuration files.
B.Consul Service Discovery
C.Kubernetes API Service Discovery
D.User manual entry in the UI.
E.Direct SQL database connections.
AnswersA, B, C

Static configuration files let Prometheus scrape targets listed explicitly in prometheus.yml, without any external registry. This satisfies the scenario's need for a file-based service discovery mechanism, one of the standard target sources alongside Consul and Kubernetes API discovery.

Why this answer

Kubernetes service discovery, static file configs, and Consul are standard discovery methods.

210
MCQmedium

If you have a metric `http_requests_total` and want the increase over 5 minutes, what is the best PromQL syntax?

A.increase(http_requests_total[5m])
B.delta(http_requests_total[5m])
C.rate(http_requests_total[5m])
D.sum(http_requests_total[5m])
AnswerA

`increase()` extrapolates the counter's growth across the 5-minute range vector, automatically handling counter resets and scaling to the window boundaries. This satisfies the stem's requirement for the rise in `http_requests_total` over exactly 5 minutes, unlike `delta()`, which ignores resets and suits gauges rather than counters.

Why this answer

The `increase()` function is specifically designed to calculate the increase of counter values over a specified range.

211
MCQeasy

Which function would you use to find the maximum value of a gauge metric 'node_cpu_load' over the past 30 minutes?

A.rate(node_cpu_load[30m])
B.max(node_cpu_load[30m])
C.topk(1, node_cpu_load[30m])
D.max_over_time(node_cpu_load[30m])
AnswerD

`max_over_time` is the correct range-vector function here: it evaluates each time series returned by `node_cpu_load` across the 30-minute window and returns the highest sample value, satisfying the "maximum over the past 30 minutes" constraint. `max()` instead aggregates across series at a single instant, not over time.

Why this answer

The max_over_time() function calculates the maximum value of all data points in the specified range vector for each time series.

212
Multi-Selecteasy

Which THREE of the following are common use cases for the node_exporter?

Select 3 answers
A.Tracking memory consumption.
B.Scraping application-specific business logic.
C.Monitoring CPU utilization.
D.Checking filesystem mount points and usage.
E.Executing SQL queries on a database.
AnswersA, C, D

Tracking memory consumption is a core node_exporter use case because it exposes host-level metrics such as node_memory_MemAvailable_bytes and node_memory_MemTotal_bytes from /proc/meminfo. This satisfies the scenario's requirement for operating system memory visibility, which application-level instrumentation cannot provide.

Why this answer

node_exporter is the Prometheus exporter for hardware and OS-level metrics on Linux/Unix hosts, so option A (tracking memory consumption) is correct because it exposes metrics such as node_memory_MemAvailable_bytes and node_memory_MemTotal_bytes from /proc/meminfo. Option C (monitoring CPU utilization) is correct because node_exporter collects per-mode CPU counters like node_cpu_seconds_total, which are used to compute utilization rates. Option D (checking filesystem mount points and usage) is correct because node_exporter exposes node_filesystem_size_bytes, node_filesystem_avail_bytes, and node_filesystem_mount_info per mount point via the filesystem collector.

Option B does not belong because application-specific business logic requires a custom exporter or instrumentation (e.g., a Prometheus client library), not node_exporter. Option E does not belong because executing SQL queries is the job of a database exporter such as mysqld_exporter or postgres_exporter, not node_exporter.

Exam trap

PCA often tests the boundary between host-level metrics (node_exporter) and application-level instrumentation (client libraries), so candidates who see 'application-specific' or 'database' options may wrongly assume node_exporter can cover them.

213
MCQmedium

A batch job runs for only 30 seconds every hour. How should you expose these metrics to Prometheus?

A.Use the Pushgateway
B.Use an exporter sidecar
C.Increase scrape interval to 1 hour
D.Add a scrape_config for the batch job
AnswerA

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.

Why this answer

The Pushgateway is designed specifically for short-lived jobs that cannot be scraped directly.

214
MCQmedium

You need to calculate the 99th percentile HTTP request latency from a Prometheus histogram named http_request_duration_seconds. Which function is correct?

A.rate(histogram_quantile(0.99, http_request_duration_seconds_bucket)[5m])
B.quantile_over_time(0.99, http_request_duration_seconds[5m])
C.histogram_quantile(0.99, rate(http_request_duration_seconds_bucket[5m]))
D.histogram_quantile(http_request_duration_seconds_bucket[5m], 0.99)
AnswerC

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.

Why this answer

The correct PromQL expression is histogram_quantile(0.99, rate(http_request_duration_seconds_bucket[5m])). This computes the 99th percentile by first calculating the per-second rate of increase of each bucket over a 5-minute window, then applying histogram_quantile to interpolate the quantile from the bucket boundaries. The rate function is essential to convert cumulative counters into a rate suitable for quantile estimation.

Exam trap

The trap is forgetting to apply rate() to the bucket counters or misordering arguments; candidates often confuse histogram_quantile with quantile_over_time or place rate incorrectly.

How to eliminate wrong answers

Option A is wrong because it nests histogram_quantile inside rate, which is invalid: rate expects a range vector of counters, not a scalar quantile result. Option B is wrong because quantile_over_time operates on raw time series values (e.g., gauges) and does not correctly handle histogram buckets; it would compute a quantile of bucket counts, not of the observed latency distribution. Option D is wrong because the arguments to histogram_quantile are reversed (it expects the quantile first, then the bucket rate vector) and it lacks the rate function, so it would operate on cumulative counts, yielding incorrect results.

215
MCQmedium

You are seeing 'Alerting rule evaluation error' in your logs. What is the most likely cause?

A.Alertmanager is down
B.Too many dashboards
C.Invalid PromQL in the expression
D.Prometheus is out of disk space
AnswerC

Prometheus evaluates each alerting rule's expression against the query engine; malformed syntax or invalid functions in the PromQL cause evaluation to fail, producing exactly this error. Correcting the expression's syntax resolves the alerting rule evaluation error.

Why this answer

The error message 'Alerting rule evaluation error' originates from the Prometheus rule evaluation engine when it cannot successfully execute the PromQL expression defined in a rule. The most common cause is a syntactically or semantically invalid PromQL expression — for example, referencing a non-existent metric, using an unsupported function, or mismatching label matchers. Prometheus logs this error per rule per evaluation cycle, so the fix is to validate the expression in the Prometheus expression browser or with promtool check rules.

Exam trap

PCA often tests the distinction between Prometheus-side rule evaluation failures and Alertmanager-side delivery failures — candidates incorrectly blame Alertmanager for errors that actually originate in the Prometheus rule engine.

How to eliminate wrong answers

Option A is wrong because Alertmanager being down would prevent alerts from being delivered, but it would not cause a rule evaluation error in Prometheus — the rule engine evaluates independently of Alertmanager's availability. Option B is wrong because the number of dashboards in Grafana has no bearing on Prometheus rule evaluation; dashboards are read-only consumers of the query API. Option D is wrong because disk space exhaustion would produce storage-related errors (e.g., 'no space left on device' or WAL write failures), not a rule evaluation error tied to a specific expression.

216
MCQeasy

What is the purpose of the instant vector selector syntax http_requests_total{job="api-server"}?

A.It aggregates all API server requests into a single sum.
B.It triggers an alert if the job is down.
C.It selects historical data points spanning the last hour for the matching series.
D.It selects current values of time series matching the metric name and label filter.
AnswerD

An instant vector selector returns one sample per matching series at the evaluation timestamp, filtered by metric name and label matchers such as job="api-server". It does not range over time or aggregate; it yields current values for the selected series.

Why this answer

The instant vector selector http_requests_total{job="api-server"} returns the most recent sample value for every time series whose metric name is http_requests_total and whose job label equals 'api-server'. It is evaluated at a single point in time (the query evaluation timestamp), producing one value per matching series rather than a range of samples. This is the fundamental building block for PromQL queries that feed into functions like rate(), sum(), or comparison operators.

Exam trap

The trap here is confusing instant vector selectors with range vector selectors — candidates see a label filter and assume it queries historical data, but the absence of a [duration] suffix means it returns only the latest sample per series.

How to eliminate wrong answers

Option A is wrong because an instant vector selector performs no aggregation — it returns one element per matching series, and aggregation requires an explicit function such as sum() or avg(). Option B is wrong because alerting is handled by alerting rules (with for/expr clauses) evaluated by the Alertmanager pipeline, not by a selector expression itself. Option C is wrong because selecting historical data over a time window requires a range vector selector with a duration suffix, e.g. http_requests_total{job="api-server"}[1h], not the bare instant selector.

217
MCQmedium

Which function is best suited for identifying the 'top 5' instances with the highest value for a specific metric?

A.sort_desc()
B.max_over_time()
C.topk(5, metric)
D.limit_rate(5, metric)
AnswerC

topk is an aggregation operator that returns the k time series with the highest instantaneous values for the given metric, sorted descending. It directly satisfies the 'top 5' ranking constraint, unlike sum, avg or count, which aggregate across series rather than selecting individual ones.

Why this answer

topk(5, metric) is the PromQL aggregation operator that returns the 5 time series with the highest instantaneous values for the given metric, which is exactly what is needed to identify the top 5 instances. It operates as an aggregation over the sample set at each evaluation step, preserving the labels of the winning series so you can see which instance is which. This is the canonical way to build 'top N' dashboards or alerts in Prometheus.

Exam trap

The trap is assuming sort_desc() alone gives you a 'top 5' — it sorts but does not limit, so candidates who forget the k-limiting behavior of topk pick the wrong operator.

How to eliminate wrong answers

Option A is wrong because sort_desc() only orders the full result set in descending order — it does not limit the output to a fixed number of series, so you would still get every instance, just sorted. Option B is wrong because max_over_time() returns the maximum value of a single series over a time range, not a cross-series ranking, so it cannot identify which instances are the top 5. Option D is wrong because limit_rate() is not a PromQL function at all; it is a fabricated name that confuses rate-limiting concepts with query aggregation.

218
MCQmedium

What is the impact of naming a metric starting with an underscore?

A.Automatic aggregation
B.Reserved for internal use
C.Performance loss
D.Syntax error
AnswerB

Underscore-prefixed metric names are reserved for internal use by the monitoring system, so user-defined metrics cannot claim them. This satisfies the stem's constraint on naming impact: such metrics are hidden from standard queries and dashboards, and Prometheus-style tooling treats them as non-public, preventing collisions with system-generated series.

Why this answer

Metric names starting with underscores are reserved for internal use by Prometheus and should be avoided for user-defined metrics.

219
MCQeasy

Which operator has higher precedence in PromQL: exponential (^), multiplication (*), or addition (+)?

A.Addition (+)
B.All arithmetic operators share equal precedence.
C.Multiplication (*)
D.Exponentiation (^)
AnswerD

Exponentiation binds tighter than multiplication and addition, so PromQL evaluates `^` first, then `*`, then `+`, matching standard mathematical precedence. This satisfies the stem's requirement to identify the highest-precedence operator among the three, since `^` outranks both `*` and `+` in every expression.

Why this answer

Exponentiation has the highest precedence in PromQL, followed by multiplication/division, and then addition/subtraction.

220
Multi-Selecteasy

Which TWO are common types of Prometheus exporters?

Select 2 answers
A.Node Exporter
B.Log Exporter
C.Push Exporter
D.Blackbox Exporter
E.Trace Exporter
AnswersA, D

Node Exporter runs on Linux hosts and exposes hardware and kernel metrics such as CPU, memory, disk and network statistics in Prometheus format. It is one of the most widely deployed official exporters, making it a common exporter type.

Why this answer

Node Exporter (A) is a canonical Prometheus exporter that runs on a host and exposes hardware and OS metrics such as CPU, memory, disk, filesystem, and network statistics on /metrics for Prometheus to scrape. Blackbox Exporter (D) is also a standard Prometheus exporter, but it probes external endpoints over HTTP, HTTPS, DNS, TCP, and ICMP and converts the results into Prometheus metrics, making it ideal for availability and latency monitoring. The other options are not established Prometheus exporter types: there is no standard "Log Exporter" (B) since logs are handled by Loki/Promtail rather than Prometheus, "Push Exporter" (C) is not a real exporter type because Prometheus uses the Pushgateway for push-based metrics rather than a push exporter, and "Trace Exporter" (E) relates to distributed tracing systems like OpenTelemetry/Jaeger, not Prometheus metrics collection.

Exam trap

PCA often tests the ability to distinguish official Prometheus exporters (Node, Blackbox) from non-existent or unrelated tools (Log, Push, Trace Exporters) that sound plausible but are not part of the Prometheus ecosystem.

221
MCQhard

An operator needs to find the rate of change of a counter using deriv(). Why is this considered a bad practice in Prometheus?

A.deriv() does not account for counter resets, causing massive negative drops when counters reset.
B.deriv() automatically multiplies output by an undocumented scaling factor.
C.deriv() requires native histograms, which are incompatible with standard counters.
D.deriv() only works with scalar values and rejects time series vectors.
AnswerA

deriv() fits a linear regression over the range, treating values as ordinary numbers. When a counter resets to zero, that drop is read as a genuine negative slope, yielding large negative rates instead of the reset-corrected increase rate() provides.

Why this answer

deriv() is designed for linear regression on gauge metrics over range vectors and does not handle counter resets, leading to incorrect downward spikes when counters reset.

222
MCQmedium

Which component allows Prometheus to be scaled horizontally for high availability?

A.Using a Load Balancer
B.Pushgateway
C.Prometheus Operator
D.Running identical instances in parallel
AnswerD

Running identical Prometheus instances in parallel satisfies the horizontal scaling requirement: each replica scrapes the same targets independently, so queries can be served by any instance and a failed replica does not lose data. This removes the single-node bottleneck without needing sharding or federation.

Why this answer

Prometheus is a single-node, stateful system with no built-in clustering, so horizontal scaling for high availability is achieved by running two or more identical Prometheus instances scraping the same targets in parallel. Each instance maintains its own TSDB, and queries can be deduplicated or load-balanced across them.

Exam trap

PCA often tests whether candidates think Prometheus has native clustering or that the Operator provides HA — the trap is confusing management tooling (Operator) with the actual HA mechanism (parallel identical instances).

How to eliminate wrong answers

Option A is wrong because a load balancer in front of Prometheus does not make it horizontally scalable — it just distributes queries, and Prometheus itself is not designed for active-active clustering with shared state. Option B is wrong because Pushgateway is for short-lived jobs to push metrics, not for HA scaling. Option C is wrong because the Prometheus Operator manages Prometheus deployments (CRDs, config generation) but does not itself provide horizontal scaling or HA — it can deploy multiple replicas, but the HA mechanism is still parallel identical instances.

223
MCQhard

An engineer observes a massive spike in Prometheus memory usage after introducing a new custom label that includes a unique user ID. Which observability concept is being violated?

A.Data retention policy
B.Metric saturation
C.Service discovery limits
D.High cardinality
AnswerD

Each unique user ID creates a separate time series, so memory grows with user count rather than staying bounded. Label values must have low cardinality; unbounded values like user IDs explode the index and memory footprint, which is exactly the spike observed.

Why this answer

High cardinality occurs when a label has a large number of unique values, such as a unique user ID, which creates a massive number of time series. This leads to increased memory usage, slower queries, and potential instability in Prometheus. The spike in memory usage directly indicates that the cardinality of the metric has exploded due to the new label.

Exam trap

PCA often tests the confusion between high cardinality and other observability concepts like retention or saturation, but the key giveaway is a label with unique values (e.g., user ID) causing memory spikes.

How to eliminate wrong answers

Option A is wrong because data retention policy governs how long data is stored, not the number of unique time series; it does not cause memory spikes from new labels. Option B is wrong because metric saturation refers to a metric reaching a maximum value or limit, not the proliferation of time series. Option C is wrong because service discovery limits pertain to the number of targets discovered, not the cardinality of labels within metrics.

224
MCQmedium

When instrumenting an application, why is it recommended to use a fixed set of label names?

A.To increase resolution
B.For better formatting
C.To avoid cardinality explosion
D.To simplify coding
AnswerC

Each unique label value combination creates a distinct time series. Unbounded or high-churn label names multiply series combinatorially, overwhelming Prometheus memory and storage. Fixing label names constrains that growth, directly preventing the cardinality explosion the stem asks about.

Why this answer

Dynamically changing label names creates new time series, which can lead to cardinality explosion and storage issues.

225
MCQmedium

A developer wants to expose a metric that represents the current memory usage of a process. Which type is most appropriate?

A.Counter
B.Summary
C.Gauge
D.Histogram
AnswerC

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.

Why this answer

A Gauge is the correct metric type because it represents a value that can arbitrarily go up or down over time, such as current memory usage, CPU load, or temperature. Prometheus gauges expose instantaneous snapshots via Set(), Inc(), and Dec() operations, making them ideal for measuring fluctuating resource consumption. Memory usage is not cumulative and can decrease when a process releases memory, which rules out Counter.

Exam trap

PCA often tests the distinction between Counter (monotonic, ever-increasing) and Gauge (arbitrary up/down), so candidates who see 'memory usage' and reflexively pick Counter because it sounds like a measurement fall into the trap.

How to eliminate wrong answers

Option A is wrong because a Counter is a monotonically increasing value that only resets on process restart — it is designed for cumulative counts like total requests served, not values that can decrease. Option B is wrong because a Summary samples observations (typically request durations or sizes) and produces quantiles and sums over a sliding time window, not a single instantaneous value. Option D is wrong because a Histogram buckets observations into configurable ranges to compute quantiles and counts, which is inappropriate for a single scalar like memory usage.

Page 2

Page 3 of 4

Page 4

All pages