Courseiva

Prometheus Certified Associate (PCA, CNCF/Linux Foundation) (PCA) (PCA) — Questions 1–75

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

Page 1 of 4

Page 2
1
MCQmedium

What is the primary benefit of using a pull-based model for monitoring?

A.It supports higher data throughput.
B.The Prometheus server can detect target failure.
C.It is easier to configure for firewalls.
D.It avoids network security issues.
AnswerB

In a pull model Prometheus initiates each scrape, so a failed connection or timeout directly signals that the target is down. This lets the server detect target failure itself, rather than waiting for the target to push data, satisfying the scenario's requirement for the primary pull-based benefit.

Why this answer

The primary benefit of a pull-based model for monitoring is that the Prometheus server can detect target failure. In a pull model, the monitoring server periodically scrapes metrics from targets; if a target fails to respond, the server can immediately detect that failure and trigger alerts. This is a key advantage over push-based models where the absence of data might not be noticed as quickly.

Exam trap

PCA often tests the trade-offs between pull and push models; candidates might think pull is easier for firewalls, but it's actually the opposite because the server must initiate connections.

How to eliminate wrong answers

Option A is wrong because pull-based models do not inherently support higher data throughput; throughput depends on the server's capacity and scrape intervals, and push models can sometimes handle higher throughput with less overhead. Option C is wrong because pull-based models can be more difficult to configure for firewalls, as the monitoring server must initiate connections to targets, which may require opening ports. Option D is wrong because pull-based models do not avoid network security issues; they still require network access and can be subject to security constraints.

2
Multi-Selectmedium

Which TWO of the following are true about the node_exporter?

Select 2 answers
A.It is for database monitoring
B.It performs active monitoring
C.It runs on port 9100 by default
D.It supports Windows out of the box
E.It exposes kernel metrics
AnswersC, E

node_exporter's default listen address is :9100, so it serves metrics on TCP port 9100 unless overridden with --web.listen-address. This default port is what Prometheus scrape configs for node targets conventionally reference, satisfying the question's requirement for a true statement.

Why this answer

Option C is correct because node_exporter's default listen address is :9100, so Prometheus scrapes host metrics from http://<host>:9100/metrics unless overridden with --web.listen-address. Option E is correct because node_exporter's collectors read from /proc and /sys on Linux to expose kernel-level metrics such as node_cpu_seconds_total, node_memory_MemAvailable_bytes, node_load1, and node_disk_io_time_seconds_total. Option A is wrong because node_exporter is a host/OS metrics exporter, not a database exporter; database monitoring uses exporters like mysqld_exporter, postgres_exporter, or oracledb_exporter.

Option B is wrong because node_exporter is a passive exporter that only responds when Prometheus scrapes its /metrics endpoint; active probing is done by blackbox_exporter. Option D is wrong because node_exporter is designed for Unix-like systems (Linux, BSD, macOS) and does not support Windows out of the box; Windows host metrics require windows_exporter.

Exam trap

PCA often tests whether candidates confuse node_exporter with database exporters or assume it supports Windows, so the trap is picking 'database monitoring' or 'Windows support' based on superficial familiarity.

3
MCQeasy

You are deploying Prometheus in a Kubernetes cluster and need to ensure it discovers pods labeled 'app=frontend'. Which configuration block is required?

A.kubernetes_sd_configs
B.dns_sd_configs
C.static_configs
D.file_sd_configs
AnswerA

kubernetes_sd_configs is the service discovery block that queries the Kubernetes API for pods, services and endpoints. It supplies the role-based targets Prometheus needs to find pods labelled app=frontend, satisfying the discovery requirement in the stem.

Why this answer

kubernetes_sd_configs is the standard mechanism to discover pods dynamically.

4
MCQeasy

What is the purpose of 'labels' in Prometheus?

A.To store the actual data values.
B.To define the scrape interval.
C.To identify unique time series.
D.To set the alert threshold.
AnswerC

Labels are key-value pairs attached to a metric name; the full set of label values uniquely identifies each time series within Prometheus's TSDB. This satisfies the stem's purpose, distinguishing individual series that share the same metric name.

Why this answer

Labels provide metadata to metrics, allowing for multi-dimensional querying and filtering (e.g., job='web', instance='1.2.3.4').

5
Multi-Selectmedium

Which TWO of the following are benefits of using recording rules?

Select 2 answers
A.Simplifying complex queries
B.Reducing query latency
C.Adding authentication to metrics
D.Automatically increasing retention
E.Providing UI for alerts
AnswersA, B

Recording rules precompute expensive expressions into new series, so dashboards and alerts reference a single stored metric instead of re-running complex PromQL. This satisfies the stem's benefit by simplifying complex queries and reducing repeated evaluation cost at query time.

Why this answer

Recording rules are correct in options A and B because they precompute expensive or frequently used PromQL expressions and store the result as a new time series, so complex queries can be referenced by a simpler metric name (A: simplifying complex queries) and dashboards or alerts that use that precomputed series avoid re-evaluating the full expression at query time, which lowers query latency (B: reducing query latency). They do not add authentication to metrics (C), since authentication is handled by the metrics endpoint, reverse proxy, or service configuration, not by recording rules. They also do not automatically increase retention (D), because retention is controlled by storage configuration such as retention time or size limits, and they do not provide a UI for alerts (E), since alerting UIs come from tools like Alertmanager or Grafana rather than from recording rules themselves.

6
MCQmedium

Which label is used to group alerts in Alertmanager?

A.group_by
B.repeat_interval
C.group_wait
D.group_interval
AnswerA

`group_by` aggregates alerts sharing specified label values into a single notification, directly satisfying the stem's requirement to group alerts. It defines which labels Alertmanager uses to batch related alerts, reducing notification noise. Other labels merely route or match alerts rather than controlling aggregation.

Why this answer

The group_by label in Alertmanager is used to group alerts into a single notification based on specified labels. This reduces noise by combining related alerts. The other options are timing parameters, not grouping labels.

Exam trap

The trap is confusing group_by with the timing parameters group_wait, group_interval, and repeat_interval; candidates must remember that group_by is the label used for grouping, not a timing setting.

How to eliminate wrong answers

Option B is wrong because repeat_interval defines how often to resend a notification if the alert is still firing. Option C is wrong because group_wait is the initial wait time before sending a notification for a group. Option D is wrong because group_interval is the time to wait before sending notifications about new alerts added to a group.

7
MCQeasy

A team wants to visualize metrics from Prometheus in Grafana. What is the standard way to connect these two services?

A.Upload a JSON file to Prometheus
B.Add a 'Prometheus' data source in Grafana
C.Configure a Prometheus scrape job for Grafana
D.Install the 'Grafana-exporter' in Prometheus
AnswerB

Adding a Prometheus data source in Grafana queries the Prometheus HTTP API directly, so no intermediary exporter or federation layer is needed. This satisfies the stem's requirement to visualise existing Prometheus metrics, since Grafana's built-in data source plugin translates PromQL queries and renders the returned time series natively.

Why this answer

Grafana allows users to add Prometheus as a 'Data Source' by providing the URL of the Prometheus server.

8
MCQmedium

When creating a custom exporter, which component is responsible for scraping the data?

A.The Pushgateway
B.The exporter itself
C.The client library
D.The Prometheus server
AnswerD

The Prometheus server performs the scraping: it pulls metrics from configured targets at set intervals via HTTP. For a custom exporter, the exporter merely exposes metrics in Prometheus format on an endpoint; the server initiates collection. This satisfies the stem's requirement by identifying the active puller rather than the passive endpoint.

Why this answer

In the Prometheus pull model, the Prometheus server is the component that initiates scrapes by sending HTTP GET requests to the /metrics endpoint exposed by exporters. The exporter's job is to expose metrics, not to scrape them. This is why custom exporters only need to serve metrics in the Prometheus text format — the server handles the scraping schedule.

Exam trap

PCA often tests the misconception that the exporter scrapes data — candidates pick 'the exporter itself' because it sounds like the active component, missing that Prometheus is fundamentally pull-based and the server initiates all scrapes.

How to eliminate wrong answers

Option A is wrong because the Pushgateway is used for short-lived jobs that cannot be scraped; it receives pushed metrics and exposes them for Prometheus to scrape, but it does not perform scraping itself. Option B is wrong because the exporter exposes metrics on an HTTP endpoint — it is the scrape target, not the scraper. Option C is wrong because client libraries instrument application code to produce metrics; they do not initiate scrapes.

9
MCQmedium

When configuring a custom exporter, how do you provide labels to a metric?

A.In the scrape config
B.Through a config file
C.Via environment variables
D.By passing a label dictionary
AnswerD

Client libraries accept a label dictionary (map of label names to values) passed at metric creation or observation time, which attaches those key-value pairs to the sample. This is the mechanism for adding dimensions such as method or status to a custom metric.

Why this answer

Labels are passed as a dictionary or map when creating the metric object in the client library.

10
MCQeasy

Which of these is NOT a Golden Signal?

A.Latency
B.Storage
C.Saturation
D.Errors
AnswerB

Storage is a resource metric, not one of the four Golden Signals: latency, traffic, errors and saturation. Those four, from Google's SRE guidance, describe user-facing service health, whereas storage capacity is an underlying infrastructure concern.

Why this answer

The Four Golden Signals are Latency, Traffic, Errors, and Saturation. 'Storage' is not one of them.

11
MCQhard

If you perform 'A / B' where A and B have different sets of labels, what happens?

A.It automatically ignores the extra labels.
B.It returns an empty result.
C.It returns the result of the division for all series.
D.It returns an error in the UI.
AnswerB

Binary operators match series by their full label sets. When A and B share no identical label combination, no pairing exists, so the vector matching yields nothing and the expression returns an empty result rather than an error.

Why this answer

Binary operations require matching labels unless modifiers are used; otherwise, the result is empty.

12
Multi-Selectmedium

Which THREE of the following functions can be used with counter metrics to calculate rates or increases? (Choose three)

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

irate() computes a per-second rate from only the last two samples in the range, making it responsive to sudden spikes and suitable for volatile counter metrics. This satisfies the scenario's requirement to calculate rates or increases from counters, unlike functions needing longer windows.

Why this answer

The three correct functions are irate(), rate(), and increase(). irate() (B) computes the per-second instant rate of increase of a counter over the last two samples, making it suitable for volatile counter metrics. rate() (D) calculates the average per-second rate of increase of a counter over a specified time range, which is the standard way to derive rates from counters. increase() (E) returns the total increase of a counter over a given time range, effectively rate() multiplied by the range duration, and is designed specifically for counter metrics. predict_linear() (A) performs linear regression to extrapolate future values and is not a rate/increase function for counters, while deriv() (C) estimates the per-second derivative using linear regression on gauges, not counters.

Exam trap

The trap is confusing gauge-oriented functions (deriv, predict_linear) with counter-oriented functions; candidates must remember that only rate, irate, and increase are reset-aware counter functions.

13
Multi-Selecthard

Which TWO of the following statements about PromQL label matchers are correct? (Choose TWO)

Select 2 answers
A.The = operator performs an exact string match.
B.The ?= operator performs fuzzy string matching.
C.The =~ operator is used exclusively for numeric comparisons.
D.The == operator is valid inside label selectors for filtering.
E.The !~ operator performs a negative regular expression match.
AnswersA, E

The `=` matcher filters time series where the label value equals the given string exactly, including case sensitivity. This satisfies the stem's requirement for a correct label matcher statement, as PromQL's equality operator performs full-string comparison rather than substring or regex matching.

Why this answer

Option A is correct because in PromQL the '=' label matcher performs an exact string match, selecting time series whose label value is precisely equal to the provided string. Option E is correct because the '!~' operator performs a negative regular expression match, excluding series whose label value matches the given regex. Option B is incorrect because '?=' is not a valid PromQL label matcher operator.

Option C is incorrect because '=~' is a positive regular expression match for label values, not a numeric comparison operator. Option D is incorrect because '==' is not a valid label selector operator in PromQL; equality matching uses '='.

14
MCQmedium

You notice that recording rules are consuming too much CPU on your Prometheus server. What is the most effective way to reduce the load while keeping data available?

A.Decrease the evaluation_interval
B.Move recording rules to Alertmanager
C.Increase the evaluation_interval
D.Delete all indices
AnswerC

Raising evaluation_interval lengthens the gap between rule evaluations, so each rule query executes less often and consumes proportionally less CPU. Recorded series remain written to storage, satisfying the constraint of keeping data available while cutting load.

Why this answer

Recording rules in Prometheus are evaluated at the interval defined by 'evaluation_interval' in the rule group. Increasing the evaluation_interval means rules run less frequently, which directly reduces CPU load on the Prometheus server while keeping the recorded time series available for querying.

Exam trap

The trap is reversing the direction of the interval change — candidates confuse 'increase' with 'decrease' and pick the option that actually worsens CPU load.

How to eliminate wrong answers

Option A is wrong because decreasing the evaluation_interval makes rules run more often, increasing CPU load — the opposite of the goal. Option B is wrong because Alertmanager handles alert routing and deduplication, not rule evaluation; recording rules cannot be moved there. Option D is wrong because deleting indices (a TSDB concept from systems like Elasticsearch) would destroy data and is not a Prometheus operation — Prometheus uses block-based storage, not indices.

15
Multi-Selecthard

Which THREE conditions cause a scrape to be unsuccessful?

Select 3 answers
A.High memory usage
B.Invalid metric format
C.HTTP 500 status code
D.Disk space low
E.Network connection timeout
AnswersB, C, E

A scrape fails when the target returns a non-2xx status, when the connection times out, or when the exposition body cannot be parsed. Invalid metric format breaks parsing, so the scrape is marked unsuccessful even though the HTTP request itself succeeded.

Why this answer

In Prometheus, a scrape is unsuccessful when the target cannot be reached or its response cannot be parsed. Option B (Invalid metric format) is correct because Prometheus requires the exposition format to be valid; malformed metric lines, bad labels, or non-numeric values cause the scrape to fail with a parse error. Option C (HTTP 500 status code) is correct because Prometheus treats any non-2xx HTTP response from the /metrics endpoint as a failed scrape, recording it as such in up and scrape_duration_seconds.

Option E (Network connection timeout) is correct because if the scrape cannot establish a TCP connection or exceeds the configured scrape_timeout, the scrape fails with a context deadline exceeded error. Options A (High memory usage) and D (Disk space low) do not directly cause a scrape to fail; they may affect the Prometheus server or target host generally, but they are not scrape-level failure conditions recognized by the scrape loop.

16
MCQmedium

What happens to your alerts if the Alertmanager configuration file contains a syntax error?

A.Alertmanager continues using the previous configuration
B.Prometheus stops scraping
C.Alertmanager crashes immediately
D.All alerts are dropped
AnswerA

Alertmanager validates configuration on reload; if parsing fails, it rejects the new file and keeps the previously loaded configuration running. Alerts therefore continue routing normally, satisfying the stem's scenario without dropping notifications or halting the service.

Why this answer

If the configuration is invalid, Alertmanager will fail to reload, and it will continue using the last known good configuration.

17
MCQhard

You are deploying Prometheus in a cluster with highly dynamic ephemeral pods. Which concern is the most significant regarding cardinality?

A.The network bandwidth used by the pushgateway.
B.The disk space used by WAL logs.
C.The number of targets being scraped.
D.The memory overhead of storing time series with unique label sets.
AnswerD

Each unique label combination creates a distinct time series held in memory, so ephemeral pods with churning names, IDs or hashes generate vast numbers of short-lived series. This memory overhead, not scrape volume, is the dominant cardinality constraint in dynamic clusters.

Why this answer

Cardinality in Prometheus is driven by the number of unique label combinations, and each unique time series consumes memory in the head block (in-memory TSDB) regardless of scrape frequency. Ephemeral pods with dynamic labels (pod UID, container ID, ephemeral IPs) create a churn of new series that accumulate in memory, causing OOM kills and slow queries. This memory overhead is the dominant concern.

Exam trap

PCA often tests whether candidates confuse target count with cardinality — more targets is not the same as more series, and memory (not disk or bandwidth) is the first resource to fail under cardinality explosion.

How to eliminate wrong answers

Option A is wrong because Pushgateway bandwidth is only relevant for push-based short-lived jobs and is not the primary cardinality concern for scrape-based ephemeral pods. Option B is wrong because WAL disk usage scales with sample ingestion rate and retention, not directly with cardinality; memory pressure hits first. Option C is wrong because the number of targets affects scrape load and CPU, but cardinality (unique label sets per target) is what explodes memory — 1000 targets with 10 series each is fine, 10 targets with 100k series each is fatal.

18
MCQmedium

You need to calculate the per-second rate of increase of http_requests_total over a 1-minute window. Why is using a 1-minute range window generally discouraged in production?

A.It is too short relative to typical scrape intervals, leading to high noise and sensitivity to jitter.
B.It disables counter reset detection algorithms.
C.PromQL automatically rejects any range window shorter than 5 minutes.
D.It causes Prometheus to run out of memory due to high sample density.
AnswerA

A one-minute range spans only a few samples at typical 15–60 second scrape intervals, so PromQL's rate() extrapolation amplifies scrape jitter and produces volatile, unreliable per-second values. This directly addresses the stem's constraint: short windows relative to scrape intervals yield noisy, jitter-sensitive results unsuitable for production alerting.

Why this answer

Prometheus scrapes most targets every 15 seconds. A 1-minute window only contains about 4 data points, making the rate calculation highly sensitive to small scraping jitters.

19
MCQmedium

Which function should be used to smooth out short-term fluctuations in a gauge metric by calculating the rolling average over a 10-minute window?

A.rate(node_load1[10m])
B.avg_over_time(node_load1[10m])
C.smooth(node_load1, 10m)
D.avg(node_load1[10m])
AnswerB

avg_over_time computes the mean of all samples within the specified range, so wrapping node_load1 in [10m] yields a rolling ten-minute average that damps short spikes. This directly satisfies the stem's requirement to smooth short-term fluctuations in a gauge.

Why this answer

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

20
MCQeasy

Which Grafana feature allows you to see data from multiple Prometheus servers on a single panel?

A.Panel injection
B.Metric merging
C.Data source variables
D.Prometheus federation
AnswerC

Variables enable users to dynamically switch or select data sources in a panel.

Why this answer

Grafana allows you to define multiple data sources and even mix them within a dashboard, or use a data source proxy.

21
MCQmedium

A system is experiencing high latency. You need to identify if the latency is caused by external dependencies. Which of the Four Golden Signals is most relevant for this discovery?

A.Latency
B.Errors
C.Saturation
D.Traffic
AnswerA

Latency as a Golden Signal distinguishes successful-request duration from error duration, so you can break down response time by dependency. If external calls dominate the slow percentile, the latency originates outside the service, directly satisfying the need to isolate external-dependency causation.

Why this answer

Latency, one of the Four Golden Signals, measures the time it takes to service a request, and it is the signal explicitly designed to reveal slow responses. By breaking latency down by dependency (e.g., downstream API, database, third-party service), you can determine whether external dependencies are the source of the slowdown. This makes Latency the most relevant signal for diagnosing high-latency issues.

Exam trap

PCA often tests whether candidates can map a symptom to the correct Golden Signal — the trap is choosing Saturation or Traffic when the question is specifically about time spent per request, which belongs to Latency.

How to eliminate wrong answers

Option B is wrong because Errors track the rate of failed requests (e.g., HTTP 5xx, exceptions), which indicates correctness problems rather than slowness. Option C is wrong because Saturation measures how full a resource is (CPU, memory, queue depth), which points to capacity limits rather than external dependency delays. Option D is wrong because Traffic measures demand volume (requests per second), which explains load but not the per-request time attributed to external calls.

22
MCQhard

You are joining two vectors where the left vector has labels {job="api", instance="host1"} and the right vector has labels {job="api", region="us-east"}. You use the query 'vector_a + ignoring(instance, region) vector_b'. What does the 'ignoring' modifier do?

A.It replaces missing instance and region labels with default values.
B.It removes 'instance' and 'region' from the final output time series.
C.It causes Prometheus to exclude the listed labels ('instance', 'region') from consideration during the equality check between the two vectors.
D.It hides errors caused by missing 'instance' or 'region' labels in the time series.
AnswerC

The ignoring modifier removes the named labels from the matching signature before equality is tested. Excluding instance and region leaves job as the sole common label, so samples pair on job alone despite differing label sets, satisfying the join requirement.

Why this answer

The `ignoring` modifier in PromQL vector matching tells Prometheus to ignore the specified labels when matching time series between the two vectors. In this case, `ignoring(instance, region)` means that the labels `instance` and `region` are not considered when finding matching pairs, so the left vector's `instance` and right vector's `region` are excluded from the equality check. This allows matching based on the remaining labels, such as `job`.

Exam trap

The trap here is confusing `ignoring` with label removal or default substitution; candidates often think it modifies the output rather than just the matching criteria.

How to eliminate wrong answers

Option A is wrong because `ignoring` does not replace missing labels with defaults; it simply excludes them from the matching process. Option B is wrong because `ignoring` does not remove labels from the output; the resulting time series will still carry the labels from the left vector (and possibly the right, depending on the operation). Option D is wrong because `ignoring` does not hide errors; if no match is found, the result is an empty vector, not an error suppression.

23
MCQeasy

What is the primary difference between an instant vector and a range vector in PromQL?

A.An instant vector contains a single sample per time series, while a range vector contains a set of samples over time.
B.An instant vector includes timestamps from the future, while range vectors are strictly historical.
C.An instant vector can only be used with counters, while range vectors can only be used with gauges.
D.A range vector evaluates faster because it caches historical calculations.
AnswerA

An instant vector holds one sample per series at a single evaluation timestamp, whereas a range vector holds every sample within a specified lookback window for each series. This satisfies the stem's distinction, and only range vectors can feed functions such as rate() or increase().

Why this answer

Instant vectors contain a single sample per time series for the given timestamp, whereas range vectors contain a set of data points over a time window.

24
MCQeasy

What is the difference between 'count' and 'count_values'?

A.count_values is faster.
B.count is for gauges; count_values is for counters.
C.count returns the number of series; count_values returns the frequency of values.
D.There is no difference.
AnswerC

`count` aggregates across series, yielding one output series per input group, whereas `count_values` buckets by observed sample value and emits one series per distinct value, exposing its frequency. This satisfies the stem's requirement to distinguish cardinality counting from value-frequency distribution.

Why this answer

count aggregates by number of series, while count_values counts the number of occurrences of each sample value.

25
Multi-Selecthard

Which THREE features are provided by the Prometheus HTTP API?

Select 3 answers
A.Retrieving alert rules
B.Listing active targets
C.Configuring SMTP
D.Querying time series data
E.Updating scrape interval
AnswersA, B, D

The Prometheus HTTP API exposes the `/api/v1/rules` endpoint, which returns currently configured alerting and recording rules, optionally filtered by type, rule name or group. This directly satisfies the stem's requirement to retrieve alert rules, distinguishing it from endpoints handling queries, targets or metadata.

Why this answer

The Prometheus HTTP API exposes endpoints that let clients retrieve alert rules via /api/v1/rules, so option A is correct because it returns configured alerting and recording rules. Option B is correct because the /api/v1/targets endpoint lists active scrape targets along with their labels, state, and last scrape/error information. Option D is correct because the /api/v1/query and /api/v1/query_range endpoints execute PromQL queries against time series data.

Option C is not part of the Prometheus HTTP API; SMTP settings for Alertmanager are configured in Alertmanager's configuration file, not through Prometheus's API. Option E is also not provided, since scrape intervals are defined in the Prometheus configuration file (scrape_configs) and require a config reload or restart, not an API call.

26
MCQhard

You are troubleshooting a query and notice that label_replace is being used. What is the primary function of label_replace(v, dst_label, replacement, src_label, regex)?

A.It renames the Prometheus server instance in federated environments.
B.It drops all time series that do not contain the specified source label.
C.It matches a regex against a source label value and writes the result into a destination label.
D.It replaces the metric name with a new string.
AnswerC

label_replace() applies the supplied regex to the source label's value, and on a match writes the replacement string, with capture-group references, into the destination label. It rewrites labels for grouping or joining; it does not alter sample values or timestamps.

Why this answer

The label_replace function matches the regex against the value of src_label, and if it matches, sets dst_label to the replacement string.

27
MCQmedium

When designing a monitoring strategy, why should you avoid monitoring 'everything'?

A.Logs are always better for everything.
B.The network will be saturated.
C.Prometheus cannot handle many metrics.
D.It leads to signal noise and high resource costs.
AnswerD

Collecting every available metric floods dashboards and alerts with low-value data, obscuring genuine incidents. It also inflates storage, scrape load and licensing costs. Avoiding this preserves signal clarity and controls resource expenditure, satisfying the stem's rationale.

Why this answer

Excessive metric collection leads to high storage costs, increased query latency, and signal-to-noise ratio degradation (alert fatigue).

28
MCQeasy

Which Grafana panel type is best for showing a trend of a metric over time?

A.Table
B.Stat
C.Bar gauge
D.Time series
AnswerD

Time series panels plot metric values against a timestamped x-axis, rendering successive data points as a continuous line. This directly satisfies the requirement to visualise how a metric changes over time, unlike stat, gauge or table panels which show only current or aggregated values.

Why this answer

The Time series panel is the standard for plotting metrics over time.

29
MCQmedium

Which metric type would best capture the distribution of request latencies?

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

Histograms bucket observations into configurable ranges and expose cumulative counts plus a sum, letting you calculate quantiles such as p95 latency across aggregated series. That distributional view is what latency analysis needs, unlike a gauge or counter, satisfying the requirement to capture request latency distribution.

Why this answer

A Histogram is the correct metric type for capturing the distribution of request latencies because it buckets observations into configurable ranges and exposes cumulative counters per bucket, allowing calculation of percentiles (e.g., p50, p95, p99) via histogram_quantile() in PromQL. Latency is inherently a distribution, not a single value, so bucketing is required to observe spread and tail behaviour. Histograms are also aggregatable across instances, which is essential for fleet-wide latency SLOs.

Exam trap

The trap is the Summary-versus-Histogram distinction: candidates pick Summary because it 'reports percentiles,' forgetting that only Histograms can aggregate distributions across instances.

How to eliminate wrong answers

Option A is wrong because a Summary computes quantiles client-side and, while it can report latency percentiles, those quantiles cannot be aggregated across multiple instances, making it unsuitable for fleet-wide distribution analysis. Option B is wrong because a Gauge represents a value that can go up or down (like temperature or queue depth) and does not capture a distribution of observations. Option C is wrong because a Counter only monotonically increases and cannot represent latency values or their spread.

30
MCQmedium

You are using the blackbox_exporter to monitor an HTTP endpoint. Which module configuration is required to check the HTTP status code?

A.http_2xx
B.dns_query
C.tcp_connect
D.icmp_ping
AnswerA

The http_2xx module probes the endpoint and marks success only when the returned HTTP status code falls in the 2xx range, directly satisfying the requirement to check the status code. Other modules such as tcp_connect or icmp test reachability, not HTTP response codes.

Why this answer

The http_2xx module is the standard configuration for checking that an endpoint returns a successful HTTP status code.

31
Multi-Selectmedium

Which THREE of the following are valid set operators in PromQL for combining instant vectors? (Choose THREE)

Select 3 answers
A.intersect
B.union
C.unless
D.and
E.or
AnswersC, D, E

`unless` returns left-hand samples only where no matching right-hand series exists, filtering by label set. It satisfies the stem's requirement for a valid PromQL set operator combining instant vectors, alongside `and` and `or`. Unlike arithmetic binary operators, it operates purely on label matching rather than values.

Why this answer

In PromQL, the set operators available for combining instant vectors are `and`, `or`, and `unless`. Option D (`and`) is correct because it returns the elements of the left-hand vector that also exist in the right-hand vector, matching on labels. Option E (`or`) is correct because it returns all elements of the left-hand vector plus any elements from the right-hand vector that do not have matching label sets on the left.

Option C (`unless`) is correct because it returns elements of the left-hand vector that do not have matching label sets in the right-hand vector. Options A (`intersect`) and B (`union`) are not valid PromQL set operators; the intersection behavior is expressed by `and`, and union-like behavior is expressed by `or`, so neither keyword exists in the language.

32
MCQmedium

Which function evaluates the predictable linear extrapolation of a gauge metric over time to predict future values?

A.predict_linear(node_filesystem_free_bytes[1h], 4 * 3600)
B.holt_winters(node_filesystem_free_bytes[1h], 5m, 1m)
C.deriv(node_filesystem_free_bytes[1h])
D.extrapolate_linear(node_filesystem_free_bytes[1h], 4 * 3600)
AnswerA

`predict_linear` fits a least-squares linear regression over the 1h range vector and extrapolates it 4 hours ahead, satisfying the stem's demand for predictable linear extrapolation of a gauge over time. It returns the projected value of `node_filesystem_free_bytes`, exposing when the filesystem will exhaust free space.

Why this answer

predict_linear() is the PromQL function designed to perform linear regression over a range vector and extrapolate the result forward by a specified number of seconds. In predict_linear(node_filesystem_free_bytes[1h], 4 * 3600), Prometheus fits a linear trend to the last hour of samples and projects where the gauge will be in 4 hours, which is the classic pattern for disk-full alerts. The second argument is the extrapolation horizon in seconds, not a duration string.

Exam trap

The trap here is confusing deriv() (which returns the current rate of change) with predict_linear() (which returns a projected future value) — candidates who only remember 'linear regression' pick deriv and miss the extrapolation requirement.

How to eliminate wrong answers

Option B is wrong because holt_winters() performs double exponential smoothing for seasonal/trend forecasting on range vectors but does not extrapolate a linear prediction at a future timestamp the way predict_linear does, and its arguments are smoothing factors, not a future offset. Option C is wrong because deriv() only returns the per-second rate of change of a gauge based on linear regression over the range — it gives the slope, not a projected future value. Option D is wrong because extrapolate_linear() is not a real PromQL function; it is a fabricated name that sounds plausible but does not exist in the Prometheus query language.

33
Multi-Selectmedium

Which TWO of the following are valid ways to configure target discovery in Prometheus?

Select 2 answers
A.ftp_sd_configs
B.sql_sd_configs
C.ldap_sd_configs
D.dns_sd_configs
E.file_sd_configs
AnswersD, E

dns_sd_configs performs DNS SRV or A record lookups to discover targets, refreshing them on a configurable interval. This satisfies the stem's valid discovery mechanism, since Prometheus supports it natively alongside static_configs, file_sd_configs and the cloud provider integrations.

Why this answer

Option D, dns_sd_configs, is correct because Prometheus natively supports DNS-based service discovery, allowing it to periodically query A, AAAA, or SRV records to discover targets dynamically. Option E, file_sd_configs, is correct because Prometheus can read target lists from JSON or YAML files on disk and automatically reload them when the files change, making it a valid and commonly used discovery mechanism. The other options are not valid: ftp_sd_configs (A), sql_sd_configs (B), and ldap_sd_configs (C) are not service discovery integrations implemented in Prometheus; Prometheus supports mechanisms such as static_configs, dns_sd_configs, file_sd_configs, and cloud/container SD configs like kubernetes_sd_configs, consul_sd_configs, and ec2_sd_configs, but not FTP, SQL, or LDAP discovery.

34
Multi-Selectmedium

Which THREE of the following are true about the Prometheus Text Exposition Format?

Select 3 answers
A.It is a binary protocol
B.It is line-oriented
C.Each metric line has name, labels, and value
D.Comments begin with #
E.It requires an XML schema
AnswersB, C, D

Each metric sample occupies its own line, with the metric name, optional labels and value separated by whitespace, and lines terminated by a line feed. This line-oriented structure is what parsers rely on, satisfying the requirement for a true statement about the exposition format.

Why this answer

It is line-oriented, supports comments starting with #, and each metric line contains the name, optional labels, and value.

35
MCQmedium

You are monitoring a legacy batch processing job that runs for only 30 seconds once every 24 hours. Which Prometheus component is necessary to collect these metrics?

A.Prometheus Exporter
B.Prometheus Federation
C.Prometheus Pushgateway
D.Prometheus Alertmanager
AnswerC

Prometheus Pushgateway lets the short-lived batch job push its metrics before exiting, since Prometheus's pull model cannot scrape a process that only exists for 30 seconds every 24 hours. The Pushgateway holds those metrics until Prometheus scrapes it, satisfying the ephemeral-job constraint.

Why this answer

Since the job is short-lived, Prometheus's standard scrape interval will likely miss it. The Pushgateway allows the job to push metrics before exiting.

36
MCQmedium

What is the effect of using a 'Summary' metric with client-side quantiles?

A.It improves performance
B.It allows cross-instance aggregation
C.It prevents cross-instance aggregation
D.It doubles the scrape time
AnswerC

Client-side quantiles are computed per instance, so a Summary metric cannot be aggregated across instances; Prometheus cannot merge pre-computed quantiles. This satisfies the stem's constraint by preventing cross-instance aggregation, unlike Histograms, which expose bucket counters that aggregate correctly server-side.

Why this answer

Client-side quantiles are calculated per instance, making it impossible to aggregate them across multiple instances of an application.

37
MCQhard

What is the primary function of the 'scrape_timeout' configuration?

A.It limits the duration of the HTTP connection.
B.It determines how long to keep metrics in memory.
C.It sets the interval between scrapes.
D.It restricts the size of the metric payload.
AnswerA

It is the deadline for the scrape response.

Why this answer

It defines how long Prometheus waits for a response from the target before considering the scrape a failure.

38
MCQmedium

When writing a query with arithmetic operators, how does PromQL handle vector matching when both vectors have the exact same label sets?

A.It ignores labels entirely and matches strictly based on metric names.
B.It performs a one-to-one match automatically based on identical label sets.
C.It throws a matching error unless the 'on' modifier is explicitly provided.
D.It performs a cross-product join of all matching series.
AnswerB

Identical label sets on both sides give PromQL a one-to-one match by default, pairing each left-hand series with the right-hand series sharing the same labels. No on() or ignoring() clause is needed, so arithmetic between matching vectors works directly.

Why this answer

When both vectors in a PromQL arithmetic operation have identical label sets, PromQL performs a one-to-one match automatically — each series on the left is paired with the series on the right that has exactly the same labels. No 'on' or 'ignoring' modifier is needed because the default matching behavior already handles identical label sets. This is the foundation of operations like dividing a request-rate metric by a total-rate metric that share the same labels.

Exam trap

PCA often tests whether candidates know that PromQL's default one-to-one matching works automatically for identical label sets, and that errors only arise from many-to-many ambiguity — not from the absence of an 'on' modifier.

How to eliminate wrong answers

Option A is wrong because PromQL matches on the full label set (excluding __name__), not on metric names — metric names are actually dropped during matching unless preserved by a modifier. Option C is wrong because PromQL does not throw an error for identical label sets; it only errors when matching is ambiguous (many-to-one or many-to-many without a group modifier). Option D is wrong because a cross-product join is what happens when you explicitly use 'on()' with no labels or when label sets are disjoint — it is not the default behavior for identical label sets.

39
Multi-Selecthard

Which THREE components are typically involved in the standard Prometheus instrumentation and scraping process?

Select 3 answers
A.Grafana
B.Client library
C.Alertmanager
D.Exporter
E.Prometheus server
AnswersB, D, E

Client libraries expose application metrics on a `/metrics` endpoint, letting Prometheus pull counter, gauge, histogram and summary values during each scrape. This satisfies the stem's instrumentation requirement: the library is the component embedded in your code that records and publishes measurements before the Prometheus server retrieves them.

Why this answer

The standard Prometheus instrumentation and scraping process involves three core components: client libraries (option B), which are used to instrument application code and expose custom metrics via an HTTP endpoint in the Prometheus exposition format; exporters (option D), which translate metrics from third-party systems (e.g., node_exporter, mysqld_exporter) into that same exposition format; and the Prometheus server (option E), which periodically scrapes those HTTP endpoints, stores the time-series data in its TSDB, and evaluates alerting/recording rules. Grafana (option A) is only a visualization layer that queries Prometheus via PromQL and is not part of instrumentation or scraping. Alertmanager (option C) handles alert routing, grouping, and notification after Prometheus evaluates rules, so it is not involved in the instrumentation/scraping pipeline itself.

Exam trap

PCA often tests the boundary between the scrape path (client library, exporter, Prometheus server) and downstream components (Grafana, Alertmanager), tempting candidates to include visualization or alerting tools that are not part of instrumentation or scraping.

40
Multi-Selecthard

Which TWO of the following statements regarding native histograms in Prometheus are correct? (Choose TWO)

Select 2 answers
A.Native histograms require users to manually pre-define explicit bucket boundaries in application code.
B.The histogram_quantile() function can evaluate native histograms directly.
C.Native histograms store bucket distributions within a single time series sample.
D.Native histograms are incompatible with all rate-related PromQL functions.
E.Native histograms double the memory consumption of traditional counters.
AnswersB, C

Native histograms expose bucket counts through a sparse, structured sample format that histogram_quantile() parses natively, so quantile estimation works without the classic le-labelled bucket series. This satisfies the stem's requirement that the function evaluate native histograms directly.

Why this answer

Option B is correct because Prometheus's histogram_quantile() function natively supports native histograms, computing quantiles directly from the stored bucket distribution without needing the classic le-label bucket series. Option C is correct because native histograms encode the entire bucket distribution (counts across dynamically determined buckets) inside a single time series sample, rather than exposing one series per bucket as classic histograms do. Options A, D, and E are incorrect: native histograms use automatically configured, dynamic bucket boundaries so users do not pre-define explicit buckets; they work fine with rate-related PromQL functions like rate() and increase(); and they do not simply double memory consumption of counters, since their overhead depends on bucket count and schema resolution.

41
MCQhard

When using the 'repeat_interval' in Alertmanager, what does it define?

A.The timeout for the receiver
B.The TTL of the alert
C.How long to wait before firing
D.How often to resend firing alerts
AnswerD

The `repeat_interval` parameter sets how frequently Alertmanager re-notifies about an alert that remains firing after the initial notification, provided the alert has not been resolved or updated. It satisfies the scenario's requirement to define resend frequency for ongoing incidents, distinct from `group_interval`, which governs batching delays between different alert groups.

Why this answer

The repeat_interval defines how long to wait before re-sending a notification for an alert that is still active.

42
MCQeasy

Which component is best suited for long-term storage?

A.The local TSDB
B.Pushgateway
C.Remote write storage
D.Alertmanager
AnswerC

Remote write streams samples to an external system such as Thanos or Cortex, whose object storage retains data far beyond the local TSDB's retention window. This satisfies the long-term storage requirement, since Prometheus's own disk is sized for weeks, not years.

Why this answer

Prometheus is not designed for indefinite storage; external remote write storage is needed for long-term retention.

43
Multi-Selectmedium

Which THREE of these represent the Four Golden Signals?

Select 3 answers
A.Memory Usage
B.Errors
C.Traffic
D.Availability
E.Latency
AnswersB, C, E

Errors counts failed requests, satisfying the Golden Signals requirement to track request failures. Unlike latency, which measures duration, errors quantify unsuccessful outcomes, whether explicit (HTTP 500s), implicit (malformed responses), or policy-based rejections. Google's SRE guidance names errors alongside latency, traffic, and saturation as the four signals, so this option belongs in the correct set.

Why this answer

The Four Golden Signals, as defined in Google's SRE guidance, are Latency, Traffic, Errors, and Saturation, so option E (Latency) is correct because it measures the time taken to serve requests, typically distinguishing successful-request latency from failed-request latency. Option C (Traffic) is correct because it quantifies demand on the system, such as HTTP requests per second or network I/O rate. Option B (Errors) is correct because it captures the rate of failed requests, including explicit failures like HTTP 5xx responses and implicit failures such as wrong content returned with a 200 status.

The remaining options do not belong: Memory Usage (A) is only one possible component of saturation rather than a golden signal itself, and Availability (D) is a broader service-level objective concept, not one of the four signals.

44
MCQhard

Which Alertmanager feature would you use to prevent a 'ServiceDown' alert from firing if a 'GlobalNetworkOutage' alert is already active?

A.Grouping
B.Inhibition
C.Silencing
D.Routing
AnswerB

Inhibition suppresses a lower-severity alert while a matching higher-severity alert is firing, using equal label matchers. This satisfies the stem's requirement by muting ServiceDown whenever GlobalNetworkOutage is active, preventing duplicate notification storms during broad outages.

Why this answer

Inhibition rules allow one alert to suppress another based on matching labels.

45
MCQhard

A Histogram has buckets [0.1, 0.5, 1, 5]. A request takes 0.7 seconds. Which buckets will be incremented?

A.1, 5
B.None
C.0.1, 0.5
D.Only 1
AnswerA

Histogram buckets are cumulative: every bucket whose upper bound is greater than or equal to the observed value increments. With 0.7 seconds, the 1 and 5 buckets increment, while 0.1 and 0.5 do not, since 0.7 exceeds their bounds.

Why this answer

Prometheus histogram buckets are cumulative: each bucket counts all observations less than or equal to its upper bound. A 0.7-second request is ≤1 and ≤5, so the buckets with upper bounds 1 and 5 are both incremented. The 0.1 and 0.5 buckets are not incremented because 0.7 exceeds those bounds.

Exam trap

The trap here is forgetting that Prometheus histogram buckets are cumulative, causing candidates to select only the smallest matching bucket instead of every bucket whose upper bound is ≥ the observed value.

How to eliminate wrong answers

Option B is wrong because the request clearly falls within the histogram's range (0.7 is between 0.1 and 5), so at least one bucket must increment. Option C is wrong because 0.7 is greater than both 0.1 and 0.5, so those buckets are not incremented — they only count observations ≤ their bounds. Option D is wrong because it ignores the cumulative nature of Prometheus histograms: the 5-second bucket also increments for any observation ≤5, not just the smallest matching bucket.

46
MCQhard

You need to perform a binary operation between two vectors where the left vector has labels {job="api", instance="a"} and the right vector has labels {job="api"}. You want to match them using the job label while retaining the instance label from the left side. Which modifier configuration is correct?

A.vector_a * on(instance) group_left(job) vector_b
B.vector_a * on(job) group_right(instance) vector_b
C.vector_a * on(job) group_left(instance) vector_b
D.vector_a * ignoring(instance) group_left vector_b
AnswerC

Using `on(job)` restricts matching to the `job` label, ignoring the differing `instance` label that would otherwise prevent a match. `group_left(instance)` then carries the left vector's `instance` label into the result, satisfying the requirement to retain it. This is the standard many-to-one matching configuration.

Why this answer

To match on a subset of labels while retaining extra labels on the left side during a one-to-many or many-to-one operation, group_left must be used with the on modifier.

47
MCQeasy

You need to track the number of requests received by your application. Which metric type should you choose?

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

A Counter is a monotonically increasing value that only goes up, resetting to zero on restart, which suits a cumulative request tally. Tracking requests received requires this monotonic behaviour, and rate() or increase() can then derive per-second rates.

Why this answer

A counter is a cumulative metric that represents a single monotonically increasing counter whose value can only increase or be reset to zero on restart.

48
Multi-Selecthard

When performing vector matching between two vectors of different cardinalities, which THREE vector matching modifiers can be used? (Choose three)

Select 3 answers
A.on
B.group_left
C.group_by
D.match_any
E.ignoring
AnswersA, B, E

The 'on' modifier restricts matching to the label sets you explicitly name, so only series sharing those listed labels pair up. This lets vectors of differing cardinality align on a chosen subset of dimensions rather than every shared label.

Why this answer

In PromQL, when performing binary operations between two instant vectors that have different label sets or cardinalities, the on modifier restricts matching to an explicitly specified set of labels, which is essential for one-to-one matching across differing label dimensions. The group_left modifier allows a many-to-one or one-to-many match by permitting the left vector to have multiple series matching a single series on the right, which is exactly how different cardinalities are reconciled. The ignoring modifier excludes specified labels from the matching process, enabling matches between vectors whose label sets differ by the ignored labels. group_by is not a valid PromQL vector matching modifier (it is not a keyword in binary operations), and match_any is not a PromQL modifier at all, so neither belongs here.

49
Multi-Selecthard

Which THREE of the following are standard ways to handle Prometheus metrics?

Select 3 answers
A.Directly update Prometheus files on disk
B.Use official client libraries
C.Use the node_exporter textfile collector
D.Write metrics to a central database
E.Run community-supported exporters
AnswersB, C, E

Official client libraries expose metrics directly from application code in the Prometheus exposition format, so a scrape endpoint is served without a separate exporter. This satisfies the stem's requirement for a standard handling method, since instrumentation at source is the canonical approach for custom application metrics.

Why this answer

Option B is correct because Prometheus provides official client libraries (for Go, Java, Python, Ruby, etc.) that instrument application code to expose metrics on an HTTP /metrics endpoint in the Prometheus exposition format, which is the canonical way to add custom instrumentation. Option C is correct because the node_exporter textfile collector reads .prom files from a specified directory (--collector.textfile.directory) and exposes their contents as metrics, allowing scripts or batch jobs to publish custom metrics without writing a full exporter. Option E is correct because community-supported exporters (e.g., mysqld_exporter, blackbox_exporter, redis_exporter) are standard, pre-built components that translate a third-party system's metrics into Prometheus format for scraping.

Option A is wrong because Prometheus stores metrics in its own TSDB and there is no supported workflow for directly editing its on-disk files; ingestion happens via scraping or the remote-write API. Option D is wrong because writing metrics to a central database is not a Prometheus-native pattern—Prometheus itself is the time-series database, and external storage is handled via remote write/read integrations rather than direct database writes.

Exam trap

PCA often tests the pull-based ingestion model, so the trap is choosing options that imply Prometheus reads from files or databases directly, which it does not.

50
Multi-Selecthard

Which THREE of the following metrics are automatically added to all scraped targets?

Select 3 answers
A.cpu_usage
B.up
C.memory_usage
D.scrape_samples_scraped
E.scrape_duration_seconds
AnswersB, D, E

The up metric is synthesised by Prometheus for every scrape, reporting 1 when the target responded and 0 otherwise. It satisfies the stem's constraint because it is added automatically to all scraped targets, independent of exporter-supplied metrics.

Why this answer

Option B, up, is correct because Prometheus automatically synthesizes this metric for every scrape target, reporting 1 if the target was reachable and scraped successfully and 0 otherwise. Option D, scrape_samples_scraped, is correct because Prometheus automatically records the number of samples exposed by the target during each scrape. Option E, scrape_duration_seconds, is correct because Prometheus automatically measures and exposes the duration of each scrape in seconds.

Options A and C, cpu_usage and memory_usage, are not automatically added by Prometheus; such host or application metrics must be exposed by the target itself (for example, via node_exporter or a client library) and are not synthesized by the scrape process.

51
MCQhard

When configuring Alertmanager 'group_by' settings, what happens if you include a label that is not present on an incoming alert?

A.The alert is dropped
B.The alert triggers an error in the logs
C.The routing rule fails
D.The alert is grouped under a null value
AnswerD

Alertmanager evaluates group_by labels against each alert's label set. A label absent from an incoming alert resolves to an empty string, so all alerts missing that label collapse into a single group keyed by a null value.

Why this answer

Alertmanager's group_by directive groups alerts by the values of the specified labels. If a label listed in group_by is absent from an incoming alert, Alertmanager treats its value as empty/null and still groups the alert under that null value rather than dropping or erroring. This means alerts missing the label are grouped together in a single notification group.

Exam trap

The trap is assuming Alertmanager validates group_by labels and rejects or errors on alerts missing them, when in fact it silently substitutes a null/empty value and groups those alerts together.

How to eliminate wrong answers

Option A is wrong because Alertmanager does not discard alerts for missing group_by labels; the alert is still processed and notified. Option B is wrong because a missing label is not an error condition — Alertmanager handles absent labels gracefully without logging errors. Option C is wrong because routing rules evaluate matchers against alert labels independently of group_by; a missing group_by label does not cause routing to fail.

52
MCQeasy

A Prometheus selector includes a negative regex match for environment names: 'environment!="staging"'. Which selector operator achieves this using regular expressions instead of exact matching?

A.environment!~"staging"
B.environment!regex("staging")
C.environment!match("staging")
D.environment!="staging"
AnswerA

The `!~` operator applies a negative regular-expression match, so `environment!~"staging"` excludes any series whose environment label matches the regex "staging", satisfying the stem's requirement for regex-based negation rather than the exact-match `!=` operator. This mirrors the positive `=~` operator but inverts the match result.

Why this answer

The '!=' operator is for exact inequality, while '!~' is the negative regular expression match operator in PromQL.

53
MCQmedium

When writing a custom exporter in Python, what is the most common way to expose the metrics?

A.Using start_http_server()
B.Writing to a file
C.Using a message queue
D.Using a database connection
AnswerA

Using `start_http_server()` from the Prometheus Python client spins up a background HTTP endpoint that exposes metrics in the Prometheus text format, satisfying the requirement to expose custom exporter metrics without a separate web framework. It is the idiomatic, minimal-code approach for Python exporters.

Why this answer

The prometheus_client library provides a start_http_server() method to expose metrics on a specified port.

54
MCQeasy

Which of these is considered a 'counter' in Prometheus?

A.Temperature of a server room.
B.Average latency over 5 minutes.
C.Current memory usage of a process.
D.Total number of HTTP requests processed.
AnswerD

A counter is a cumulative metric that only increases (or resets to zero on restart), and total HTTP requests processed fits this exactly. It monotonically accumulates, so rate() can compute requests per second over time.

Why this answer

A counter in Prometheus is a cumulative metric that only increases (or resets to zero on process restart), and 'total number of HTTP requests processed' is the canonical example — it monotonically grows and is typically queried with rate() or increase(). Counters are used to compute rates of events over time.

Exam trap

PCA often tests whether candidates recognize that a counter must be monotonically increasing — values that fluctuate (temperature, memory, latency) are gauges, and averages are derived, not stored as counters.

How to eliminate wrong answers

Option A is wrong because temperature fluctuates up and down, making it a gauge, not a counter. Option B is wrong because an average latency is a computed/derived value (and latencies are gauges or histograms), not a monotonically increasing counter. Option C is wrong because current memory usage rises and falls, which is the definition of a gauge.

55
Multi-Selecthard

Which TWO are true about Prometheus alerting rules?

Select 2 answers
A.They use PromQL expressions for evaluation.
B.They are evaluated by the Prometheus server.
C.They always trigger a system restart.
D.They are sent to the exporter.
E.They require a separate database.
AnswersA, B

Alerting rules contain PromQL expressions evaluated against the time series database; when the expression returns results for the specified duration, the alert fires. This satisfies the requirement that rules are defined using PromQL rather than a separate query language.

Why this answer

Option A is correct because Prometheus alerting rules are defined with PromQL expressions in the rule file, and the configured expression is evaluated against time-series data to determine whether an alert should fire. Option B is correct because the Prometheus server itself evaluates alerting rules as part of its rule evaluation cycle, then sends firing alerts to Alertmanager for notification handling. Option C is incorrect because alerting rules only produce alert states such as pending or firing; they do not trigger a system restart.

Option D is incorrect because exporters expose metrics for Prometheus to scrape, and alerts are not sent to exporters. Option E is incorrect because Prometheus stores its own time-series data locally and does not require a separate database for alerting rules.

56
MCQhard

You have a global Alertmanager configuration where you want to suppress 'DiskSpaceLow' alerts if 'InstanceDown' is active for the same host. Which mechanism accomplishes this?

A.Inhibition rules
B.Route tree
C.Repeat intervals
D.Grouping
AnswerA

Inhibition rules suppress a target alert when a matching source alert is firing, using equal label matchers such as instance. This directly satisfies the stem's requirement to mute DiskSpaceLow while InstanceDown is active for the same host, which silences and routing cannot achieve.

Why this answer

Inhibition rules in Alertmanager are designed to suppress a set of alerts when another set of alerts is already firing. They match on labels, so you can define an inhibition rule that mutes 'DiskSpaceLow' alerts if an 'InstanceDown' alert with the same host label is active. This is exactly the use case described: suppressing dependent alerts when a more fundamental alert is firing.

Exam trap

PCA often tests the distinction between alert suppression mechanisms: inhibition rules suppress based on other alerts, while silences suppress based on time, and grouping/routing affect notification delivery but not suppression. Candidates frequently confuse grouping with inhibition because both reduce noise, but only inhibition uses active alerts as a condition.

How to eliminate wrong answers

Option B is wrong because the route tree determines how alerts are grouped and where they are sent (e.g., to different receivers based on label matchers), but it does not suppress alerts based on other active alerts. Option C is wrong because repeat intervals control how often a firing alert is re-notified, not whether it is suppressed. Option D is wrong because grouping aggregates multiple alerts into a single notification to reduce noise, but it does not suppress alerts conditionally based on other alerts.

57
MCQhard

You are seeing 'Too many active series' in your Prometheus logs. Which action should be your first priority to address this?

A.Switch to a different monitoring tool.
B.Disable all alerting rules.
C.Analyze the number of active series per label name.
D.Increase Prometheus memory limits.
AnswerC

'Too many active series' indicates cardinality growth, so identifying which label names contribute the most series pinpoints the offending metric before any dropping or relabelling. This diagnostic step precedes remediation such as label dropping or metric relabelling.

Why this answer

Identifying which labels are causing the high cardinality is the standard first step to prevent OOM (Out Of Memory) crashes.

58
MCQmedium

Why might you use an 'exporter' in Prometheus?

A.To bridge non-Prometheus metrics to Prometheus format.
B.To increase the scrape interval.
C.To secure the Prometheus server.
D.To push logs to Prometheus.
AnswerA

Exporters run alongside systems that natively expose no Prometheus metrics, translating their proprietary telemetry into the Prometheus text exposition format on an HTTP endpoint. Prometheus then scrapes that endpoint like any other target, bridging the format gap without altering the monitored application.

Why this answer

An exporter in Prometheus is a component that exposes metrics from a system that does not natively speak the Prometheus exposition format, translating them into Prometheus-compatible metrics on an HTTP endpoint. Prometheus then scrapes that endpoint, allowing monitoring of databases, hardware, message queues, and other third-party systems that lack native /metrics support.

Exam trap

PCA often tests the pull-model nature of Prometheus and the role of exporters as format translators, so candidates who see 'exporter' and assume it pushes data or secures the server pick the wrong option instead of the format-bridging answer.

How to eliminate wrong answers

Option B is wrong because the scrape interval is configured in the Prometheus scrape_config (scrape_interval) and is unrelated to exporters; exporters do not change how often Prometheus scrapes. Option C is wrong because securing the Prometheus server is handled by TLS, authentication, and network policies, not by exporters, which are metric sources rather than security components. Option D is wrong because Prometheus is a metrics system, not a log store; logs are handled by Loki or the ELK stack, and exporters expose metrics, not logs.

59
MCQeasy

Where do you define the threshold for a Prometheus alerting rule?

A.In the 'labels' field
B.In the Alertmanager config
C.In the 'expr' field
D.In the Grafana panel
AnswerC

A Prometheus alerting rule's 'expr' field holds the PromQL expression; the alert fires when that expression's result satisfies the rule's 'for' duration. The threshold comparison itself is written inside the PromQL expression, not in a separate numeric field.

Why this answer

In Prometheus alerting rules, the 'expr' field contains the PromQL expression that is evaluated on each evaluation interval; when the expression returns a non-empty result set, the alert transitions to pending and then firing. The threshold itself (e.g., '> 0.9' or '== 0') is embedded directly inside that PromQL expression, so the threshold is defined in 'expr'. The 'labels' field only attaches metadata (severity, team) to the alert, and Alertmanager only handles routing, grouping, silencing, and notification after Prometheus fires the alert.

Exam trap

PCA often tests the misconception that Alertmanager or Grafana defines alert thresholds, when in fact the threshold lives inside the PromQL 'expr' field of the Prometheus alerting rule and Alertmanager only routes already-fired alerts.

How to eliminate wrong answers

Option A is wrong because the 'labels' field only adds key/value metadata (such as severity or team) to the alert and cannot express a numeric or boolean threshold. Option B is wrong because Alertmanager is a separate component that receives already-fired alerts and handles deduplication, grouping, routing, and silencing — it does not evaluate PromQL or define thresholds. Option D is wrong because Grafana panels are visualization/alerting surfaces that query Prometheus; they do not define Prometheus alerting rule thresholds, which live in the rule files loaded by Prometheus.

60
MCQmedium

A legacy batch job runs once per day and finishes in seconds. Why is a standard Prometheus pull model inadequate here?

A.The data is too large for memory.
B.Pull model is insecure.
C.Prometheus cannot scrape batch jobs.
D.The job is too fast for HTTP polling.
AnswerD

A short-lived batch job may exit before Prometheus's next scrape interval, so its metrics endpoint disappears and the samples are never collected. This directly satisfies the stem's constraint: the job finishes in seconds, far quicker than typical polling, requiring a push gateway or similar mechanism instead.

Why this answer

Prometheus pull intervals are typically set to seconds or minutes; a job that finishes quickly might never be 'up' when Prometheus scrapes it.

61
MCQmedium

You want to notify different teams based on the 'service' label of an alert. Where should you configure this logic?

A.In the node exporter config
B.In the Grafana data source
C.In the Alertmanager configuration
D.In the Prometheus alerting rule
AnswerC

Alertmanager configuration routes alerts by matching label sets, so a route with a `service` matcher directs each alert to the correct receiver, satisfying the requirement to notify different teams per service label. This logic belongs in Alertmanager's routing tree, not in Prometheus scrape configs or Grafana dashboards.

Why this answer

The Alertmanager configuration file contains the routing tree that maps alerts to receivers based on labels.

62
Multi-Selecthard

Which THREE of the following are key design considerations when creating a custom exporter?

Select 3 answers
A.Only export metrics once a day
B.Expose metrics in Prometheus text format
C.Avoid high cardinality in labels
D.Ensure scraping performance is efficient
E.Use JSON for metric output
AnswersB, C, D

Prometheus text exposition format lets the custom exporter present metrics that Prometheus can scrape natively, satisfying the interoperability requirement. Each metric needs HELP and TYPE annotations plus a consistent naming convention, so the collector parses values without transformation. This directly addresses the design consideration of choosing an output format compatible with the monitoring platform consuming the data.

Why this answer

Option B is correct because Prometheus scrapes metrics over HTTP from a /metrics endpoint that must be encoded in the Prometheus text exposition format (or OpenMetrics), so a custom exporter must expose metrics in that format to be consumable. Option C is correct because each unique label value combination creates a separate time series, so high-cardinality labels (e.g., user IDs, request IDs) explode memory and storage usage in Prometheus and must be avoided. Option D is correct because the exporter is scraped on every scrape_interval, so it must respond quickly and efficiently (e.g., cache expensive computations, avoid blocking calls) to prevent scrape timeouts and missed samples.

Option A is wrong because exporters should expose current metrics continuously for each scrape rather than only once a day, and Option E is wrong because Prometheus does not ingest JSON as its native metric format—it requires the text-based exposition format.

Exam trap

PCA often tests whether candidates know Prometheus requires its own text exposition format (not JSON) and that high cardinality is a performance killer, while luring them with plausible-sounding but wrong options like infrequent export or JSON output.

63
Multi-Selecteasy

Which TWO of the following are primary components of the Prometheus monitoring architecture?

Select 2 answers
A.Fluentd
B.Alertmanager
C.Zipkin
D.Prometheus Server
E.Kibana
AnswersB, D

Alertmanager is a distinct Prometheus architecture component: it receives firing alerts from the Prometheus server, then deduplicates, groups, silences and routes them to receivers such as email or PagerDuty. This matches the stem's request for a primary component.

Why this answer

The Prometheus Server (D) is the core component of the Prometheus architecture: it scrapes metrics from instrumented targets over HTTP, stores them in its local time-series database (TSDB), and evaluates PromQL recording and alerting rules. Alertmanager (B) is the other primary component, receiving alerts fired by the Prometheus Server and handling deduplication, grouping, silencing, inhibition, and routing them to receivers such as email, Slack, or PagerDuty. Fluentd (A) is a log collection and forwarding tool, not part of Prometheus's metric-based monitoring pipeline.

Zipkin (C) is a distributed tracing system, and Kibana (E) is a visualization front end for Elasticsearch logs, neither of which are Prometheus components.

64
MCQeasy

You are monitoring a Linux server and need to track CPU usage. Which exporter is the standard choice for exposing hardware and OS metrics?

A.mysqld_exporter
B.blackbox_exporter
C.pushgateway
D.node_exporter
AnswerD

node_exporter is the standard Prometheus exporter for Linux hosts, exposing CPU, memory, disk, filesystem and network metrics from /proc and /sys. It directly satisfies the requirement to track CPU usage alongside other hardware and OS metrics.

Why this answer

node_exporter is the standard Prometheus exporter for hardware and OS metrics exposed by *NIX kernels.

65
MCQmedium

Which of the following describes the 'pull' model's benefit regarding service discovery?

A.Prometheus is always the first to start.
B.Targets push data when they are ready.
C.It reduces network traffic.
D.Targets don't need to know where Prometheus is.
AnswerD

Targets expose metrics passively, so Prometheus discovers and scrapes them without any target-side configuration naming the server. This satisfies the stem's service-discovery constraint: targets remain unaware of Prometheus's location, unlike push models where each target must know the gateway endpoint.

Why this answer

Prometheus can dynamically discover targets (via Kubernetes API, Consul, etc.) and automatically start scraping, removing the need to register every new pod.

66
Multi-Selectmedium

Which TWO of the following are true about the Gauge metric type?

Select 2 answers
A.Values can only increase
B.Calculates quantiles
C.Values are always integers
D.Used for memory usage
E.Values can increase and decrease
AnswersD, E

A gauge represents a value that can rise or fall, making it the correct type for memory usage, which fluctuates as allocations and frees occur. Counters would be unsuitable because they only increase and cannot represent a current level.

Why this answer

Option D is correct because a Gauge is the appropriate metric type for memory usage, since memory consumption fluctuates up and down over time and must be reported as an instantaneous value. Option E is correct because the defining characteristic of a Gauge is that its values can both increase and decrease, unlike a Counter which is monotonic. Option A is incorrect because values that can only increase describe a Counter, not a Gauge.

Option B is incorrect because quantile calculation is a function of histograms or summaries, not the Gauge type itself. Option C is incorrect because Gauge values are typically floating-point numbers and are not restricted to integers.

67
Multi-Selecteasy

Which TWO of the following are valid fields in a Prometheus alerting rule definition?

Select 2 answers
A.expr
B.timeout
C.retries
D.target
E.alert
AnswersA, E

The `expr` field holds the PromQL expression Prometheus evaluates on each evaluation interval; a non-empty result triggers the alert. It is mandatory in every alerting rule, satisfying the stem's requirement for a valid field alongside `alert` and `for`.

Why this answer

Option A, expr, is correct because every Prometheus alerting rule requires an expr field containing the PromQL expression that is evaluated; when it returns results, the alert fires. Option E, alert, is correct because the alert field names the alert (e.g., alert: HighErrorRate) and is the required identifier for the rule within the rule group. The unmarked options do not belong: timeout and retries are not fields of a Prometheus alerting rule (retries/timeout concepts belong to Alertmanager notification configuration or scrape configs), and target is not a valid alerting rule field, as Prometheus discovers targets via scrape_configs rather than within alert rules.

68
Multi-Selecteasy

Which TWO of the following are valid data types returned by PromQL queries? (Choose two)

Select 2 answers
A.Histogram matrix
B.Range vector
C.Log stream
D.Instant vector
E.Distributed trace
AnswersB, D

A range vector returns a set of time series, each holding multiple data points sampled over a specified time window, such as `[5m]`. This satisfies the stem's requirement for a valid PromQL data type, distinct from the instant vector's single sample per series.

Why this answer

PromQL, the query language used by Prometheus, defines exactly four expression data types: instant vector, range vector, scalar, and string. Option B (Range vector) is correct because a range vector is a set of time series containing a range of data points over time for each series, produced by appending a duration selector like [5m] to a selector (e.g., http_requests_total[5m]). Option D (Instant vector) is correct because it is the most common PromQL result type: a set of time series containing a single sample for each series at a given timestamp, returned by expressions such as http_requests_total.

The unmarked options do not belong: 'Histogram matrix' (A) is not a PromQL type—histograms are exposed as instant or range vectors of bucket series, and 'matrix' is not a PromQL data type name; 'Log stream' (C) is a Loki concept, not PromQL; and 'Distributed trace' (E) is a tracing data type (e.g., from Tempo/Jaeger), not a PromQL return type.

69
MCQeasy

A user executes an instant query for a metric without providing a range vector. What type of vector is returned by default?

A.String
B.Range vector
C.Scalar
D.Instant vector
AnswerD

An instant query evaluates at a single timestamp, so PromQL returns an instant vector holding one sample per matching series. This satisfies the stem's default behaviour, since a range vector only appears when the selector explicitly supplies a duration such as [5m].

Why this answer

An instant vector evaluates to a single data point per time series at the current evaluation timestamp.

70
MCQhard

Your application has a short-lived batch job that finishes before the Prometheus server can scrape it. What architectural component should be used?

A.Prometheus API
B.Pushgateway
C.Alertmanager
D.node_exporter
AnswerB

Pushgateway lets short-lived batch jobs push their metrics to an intermediary that Prometheus then scrapes, since the job terminates before a normal pull scrape can occur. This satisfies the stem's constraint of a job finishing before scraping.

Why this answer

The Pushgateway is designed to allow ephemeral and batch jobs to expose their metrics to Prometheus.

71
MCQhard

You want to ensure that if the Alertmanager cluster loses communication, alerts are still sent. Which configuration helps achieve this?

A.Disable grouping
B.Set repeat_interval to 0
C.Use a load balancer only
D.Use the --cluster.peer flag
AnswerD

The --cluster.peer flag joins Alertmanager instances into a gossip cluster, so notification state and silences are shared; if communication between peers fails, each node still evaluates and dispatches its own alerts. This satisfies the requirement that alerts continue being sent during cluster partition.

Why this answer

High Availability (HA) for Alertmanager is achieved by running multiple instances and using the '--cluster.peer' flag to link them.

72
MCQhard

When configuring Service Discovery in Kubernetes, why might you use relabeling?

A.To encrypt metric traffic.
B.To increase scrape frequency.
C.To store logs in Prometheus.
D.To reduce cardinality by dropping high-variance labels.
AnswerD

Relabeling rewrites label sets during service discovery, so a drop action on high-variance labels removes them before ingestion. This directly lowers series cardinality, satisfying the stem's constraint of reducing the label combinations Prometheus must store and index.

Why this answer

Relabeling in Prometheus service discovery lets you rewrite the label set of discovered targets before scraping, and a common use is dropping or aggregating high-variance labels (e.g., pod UID, ephemeral instance IDs) that would explode cardinality. Since every unique label combination creates a new time series, dropping noisy labels keeps the TSDB manageable and queries fast. This is done with `relabel_configs` using actions like `labeldrop`, `labelkeep`, `replace`, or `drop`.

Exam trap

The trap is conflating relabeling with scrape configuration tuning — candidates who see 'service discovery' and 'relabeling' often jump to scrape frequency or encryption, missing that relabeling's primary operational purpose is cardinality control.

How to eliminate wrong answers

Option A is wrong because relabeling operates on target metadata labels, not on the wire — it cannot encrypt metric traffic; TLS for scraping is configured via `scheme: https` and `tls_config`. Option B is wrong because scrape frequency is controlled by `scrape_interval` in the scrape config, not by relabeling. Option C is wrong because Prometheus is a metrics system and does not store logs at all — that is the domain of Loki, Elasticsearch, or similar; relabeling has nothing to do with log ingestion.

73
MCQhard

You have two alerts: 'InstanceDown' and 'HighErrorRate'. You want to inhibit 'HighErrorRate' if 'InstanceDown' is firing for the same instance. Where do you configure this logic?

A.In the Alertmanager 'inhibit_rules' configuration
B.In the Prometheus recording rules file
C.In the Grafana Alerting panel
D.In the Prometheus 'alerting' rule block
AnswerA

Alertmanager's `inhibit_rules` block suppresses a target alert when a matching source alert is firing, using `equal` labels to scope the match. Setting `source_matchers: [alertname="InstanceDown"]`, `target_matchers: [alertname="HighErrorRate"]` and `equal: [instance]` silences HighErrorRate only for the same instance, satisfying the stem's per-instance constraint.

Why this answer

Inhibition rules are defined within the 'inhibit_rules' section of the Alertmanager configuration file.

74
MCQhard

An engineer executes topk(3, http_requests_total). What happens if there are fewer than 3 time series matching the selector?

A.It returns all available time series without padding or error.
B.It pads the remaining slots with synthetic time series valued at 0.
C.It returns NaN for the missing slots.
D.It returns an evaluation error indicating insufficient time series.
AnswerA

topk is a selection, not a fixed-size generator. When fewer than three series match the selector, it simply returns every matching series, ranked by value, with no synthetic padding or error, satisfying the scenario where the selector yields fewer results than k.

Why this answer

If an instant vector has fewer elements than $k$, topk returns all available elements in the vector without error.

75
MCQmedium

You are using the 'predict_linear()' function to forecast disk space exhaustion based on the metric 'node_filesystem_free_bytes'. What type of input data does predict_linear require?

A.An instant vector representing current disk space.
B.A range vector of gauge values and a time duration scalar.
C.Two instant vectors joined via an 'on' clause.
D.A counter range vector wrapped in a rate() function.
AnswerB

predict_linear() extrapolates a gauge's rate of change, so it requires a range vector of gauge samples plus a scalar number of seconds to forecast ahead. A single instant sample gives no slope, so the range vector is the essential input for projecting disk exhaustion.

Why this answer

predict_linear() requires a range vector of gauge values (e.g., node_filesystem_free_bytes[1h]) and a scalar representing the number of seconds into the future to predict. It uses linear regression over the range to forecast the value at the future time.

Exam trap

PCA often tests the input types for predict_linear, and candidates may mistakenly think it requires an instant vector or a counter rate.

How to eliminate wrong answers

Option A is wrong because an instant vector only provides a single point in time, insufficient for linear regression. Option C is wrong because predict_linear does not join vectors; it operates on a single range vector. Option D is wrong because predict_linear is for gauges, not counters; using rate() on a counter would be inappropriate for disk space forecasting.

Page 1 of 4

Page 2

All pages