Courseiva

Prometheus Certified Associate (PCA, CNCF/Linux Foundation) (PCA) (PCA) — Questions 226–265

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

Page 3

Page 4 of 4

226
MCQhard

A developer adds a 'user_id' label to an HTTP request counter. What is the operational risk?

A.High cardinality will consume excessive memory.
B.The query speed will increase.
C.Prometheus will reject the metric.
D.The metric will stop recording.
AnswerA

Labelling a counter by 'user_id' creates one time series per distinct user, so cardinality scales with your user base. Prometheus holds every active series in memory, and each unique label combination multiplies storage and index overhead, exhausting RAM and degrading queries. This directly satisfies the stem's operational risk: unbounded cardinality from a high-churn identifier.

Why this answer

Adding a 'user_id' label to an HTTP request counter creates a label with unbounded, per-user values. Each unique combination of label values produces a distinct time series in Prometheus, so a user_id label can generate thousands or millions of series. Prometheus holds all active series in memory (head block), so this high cardinality rapidly consumes RAM and can destabilize or crash the server.

Exam trap

The trap here is confusing high cardinality with metric rejection — candidates assume Prometheus enforces a cardinality limit and drops the metric, when in reality it accepts the data and silently consumes memory until the server fails.

How to eliminate wrong answers

Option B is wrong because high cardinality increases the number of series that must be indexed and scanned, which typically degrades query speed rather than improving it. Option C is wrong because Prometheus does not reject metrics based on cardinality; it accepts them and simply suffers the memory consequences. Option D is wrong because the metric continues to be recorded — the risk is resource exhaustion, not cessation of scraping.

227
Multi-Selectmedium

Which THREE of these are recommended practices for an observability strategy?

Select 3 answers
A.Maintain logs for granular incident analysis.
B.Alert on symptoms instead of causes.
C.Always set alert thresholds to zero.
D.Use metrics for everything.
E.Monitor the Four Golden Signals.
AnswersA, B, E

Retaining logs gives responders the granular, timestamped detail needed to reconstruct an incident's sequence and root cause. This satisfies the requirement for recommended observability practise by ensuring sufficient telemetry depth exists before an incident occurs, enabling precise analysis instead of relying on aggregated metrics alone.

Why this answer

Option A is correct because logs provide the high-cardinality, event-level detail needed for granular incident analysis and root-cause investigation, complementing the aggregate view from metrics and traces. Option B is correct because alerting on symptoms (user-visible impact such as latency or error rate) rather than internal causes reduces noise and false pages, since causes can vary while the symptom reliably indicates user pain. Option E is correct because the Four Golden Signals — latency, traffic, errors, and saturation — are a widely recommended Google SRE framework for monitoring request-driven systems and catching the most important failure modes.

Option C is not recommended because a zero threshold would fire alerts constantly on any nonzero value, producing alert fatigue rather than meaningful signal. Option D is not recommended because metrics are cheap and aggregatable but lose per-event context; logs and traces are still required for detailed debugging, so 'metrics for everything' is an overreach.

228
MCQmedium

Which action should be avoided when creating labels for custom metrics?

A.Using static labels
B.Adding job labels
C.Adding instance labels
D.Using high-cardinality labels
AnswerD

High-cardinality labels, such as unique user IDs or timestamps, create unbounded time series that inflate storage costs and slow PromQL queries. The stem asks what to avoid, and this directly violates the cardinality constraint that keeps custom metrics performant and cost-effective in Prometheus.

Why this answer

Adding high-cardinality data (like user IDs or unique request IDs) to labels causes an explosion in the number of time series, which can crash Prometheus.

229
Multi-Selectmedium

Which TWO of the following are valid data types in Prometheus?

Select 2 answers
A.List
B.Gauge
C.Counter
D.Set
E.Boolean
AnswersB, C

Gauge is a valid Prometheus metric type representing a value that can rise or fall arbitrarily, such as temperature or memory usage. It is one of the four core types alongside counter, histogram and summary, and supports functions like delta() and predict_linear().

Why this answer

In Prometheus, the four core metric types are Counter, Gauge, Histogram, and Summary, so option B (Gauge) is correct because a gauge represents a value that can arbitrarily go up and down, such as temperature or current memory usage, and option C (Counter) is correct because a counter is a cumulative metric that only increases (or resets to zero on restart), such as total HTTP requests. These types are defined in the Prometheus client libraries and exposed via the text exposition format with TYPE annotations like 'counter' and 'gauge'. The other options are not Prometheus metric types: List (A) and Set (D) are not part of the Prometheus data model, and Boolean (E) is not a native metric type either, since boolean-like states are typically represented using a Gauge with values 0 or 1.

230
MCQmedium

Why would you choose to create a recording rule for a complex PromQL query?

A.To increase metric resolution
B.To bypass authentication
C.To reduce dashboard query latency
D.To enable cross-server alerting
AnswerC

Recording rules precompute the expensive PromQL expression and persist the result as a new time series, so dashboards read a cheap, already-aggregated metric instead of re-evaluating the complex query on every refresh, directly cutting dashboard query latency.

Why this answer

Recording rules pre-calculate complex queries, making dashboards load faster by querying the pre-computed series instead of re-calculating the entire expression.

231
Multi-Selectmedium

Which TWO of the following can be configured globally?

Select 2 answers
A.alertmanager_host
B.storage_path
C.scrape_interval
D.evaluation_interval
E.target_labels
AnswersC, D

scrape_interval is set in the global block of the Prometheus configuration file, establishing the default collection frequency for every scrape job. Individual jobs may override it, but the global value applies cluster-wide unless explicitly superseded.

Why this answer

Options C (scrape_interval) and D (evaluation_interval) are correct because both are global configuration parameters in the Prometheus configuration file's top-level `global:` block, where scrape_interval sets the default interval between scraping targets and evaluation_interval sets how often alerting and recording rules are evaluated. These values apply to all scrape jobs and rule groups unless overridden at the job or group level, making them genuinely global settings. The other options do not belong: alertmanager_host is not a valid Prometheus global setting (Alertmanager targets are configured under `alerting: alertmanagers:` with host/port details), storage_path is a command-line flag (`--storage.tsdb.path`) rather than a global config option, and target_labels is not a global configuration directive (labels are applied per scrape job or via relabeling).

232
MCQmedium

What is the benefit of the 'service discovery' feature in Prometheus?

A.It improves query performance.
B.It simplifies management in dynamic environments.
C.It encrypts the data.
D.It reduces the storage size.
AnswerB

Prometheus service discovery queries platform APIs to automatically detect scrape targets as containers and instances appear or disappear, so configuration stays accurate without manual edits. This satisfies the stem's dynamic-environment requirement, where static target lists become stale immediately after scaling events.

Why this answer

Prometheus service discovery automatically detects and updates scrape targets from dynamic sources such as Kubernetes, EC2, Consul, or DNS. In environments where instances are constantly created and destroyed, this eliminates manual target configuration and keeps monitoring in sync with the actual infrastructure. The primary benefit is simplified management in dynamic environments.

Exam trap

The trap is conflating service discovery with performance or security benefits — candidates may pick query performance or encryption, but service discovery is purely about automating target detection and management in dynamic environments.

How to eliminate wrong answers

Option A is wrong because service discovery affects target identification and scraping, not query execution performance — query speed depends on storage, indexing, and query patterns. Option C is wrong because service discovery does not encrypt data; encryption is handled at the transport layer (TLS) or storage layer, not by discovery mechanisms. Option D is wrong because service discovery does not reduce storage size; it only determines which targets are scraped, and storage size depends on retention and series cardinality.

233
MCQmedium

Why are traces considered distinct from metrics in observability?

A.Traces are always numeric.
B.Traces track individual request lifecycles through services.
C.Traces are only for frontend applications.
D.Metrics replace traces.
AnswerB

Traces record the full path of a single request as it crosses service boundaries, capturing per-span timing, parent-child relationships and errors. This satisfies the stem's distinction from metrics, which are aggregated numeric measurements over time rather than individual request lifecycles.

Why this answer

Traces provide context on a single request's path through a distributed system, whereas metrics provide aggregated health status.

234
MCQeasy

A developer wants to track the total number of requests received by a web service. Which metric type is most appropriate for this requirement?

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

A Counter only increases (or resets to zero on restart), making it the natural fit for a cumulative total of requests received. PromQL rate() and increase() then derive request rates from this monotonically increasing series.

Why this answer

A Counter is a cumulative metric that only increases (or resets to zero on restart), making it ideal for tracking the total number of requests received by a web service. Prometheus counters are used with rate() or increase() functions to calculate request rates over time.

Exam trap

PCA often tests the distinction between Counter and Gauge, causing candidates to select Gauge for cumulative totals when the value should only increase.

How to eliminate wrong answers

Option A is wrong because a Summary captures observations (e.g., request durations) and provides quantiles, not a simple cumulative count. Option C is wrong because a Histogram buckets observations into configurable ranges to track distributions, not total counts. Option D is wrong because a Gauge represents a value that can go up or down (e.g., current memory usage), not a monotonically increasing total.

235
MCQmedium

When using the Pushgateway, what happens if you push a metric with the same name and labels as an existing one?

A.It overwrites the old value
B.It creates a new series
C.It rejects the push
D.It adds to the existing value
AnswerA

Pushgateway stores pushed metrics in a keyed grouping identified by job and instance labels. Pushing a metric with an identical name and label set replaces the previously stored value for that key rather than appending a new series.

Why this answer

The Pushgateway overwrites the existing metric with the new value provided in the push request.

236
Multi-Selectmedium

Which THREE of the following are valid approaches to instrumenting an application?

Select 3 answers
A.Directly writing to Prometheus storage
B.Implementing a custom HTTP exporter
C.Using SQL queries to generate metrics
D.Using Prometheus client libraries
E.Using Pushgateway for short-lived jobs
AnswersB, D, E

A custom HTTP exporter pushes metrics or traces directly to a collector endpoint over HTTP, satisfying the requirement for a valid instrumentation approach. Unlike agents or auto-instrumentation libraries, it gives explicit control over payload format and destination, letting applications emit telemetry without depending on vendor-specific SDKs.

Why this answer

Option B is correct because implementing a custom HTTP exporter exposes application metrics on an HTTP endpoint (typically /metrics) in the Prometheus text exposition format, which Prometheus can scrape; this is a standard instrumentation pattern for applications whose metrics cannot be captured by existing client libraries. Option D is correct because Prometheus client libraries (e.g., Go, Java, Python, Ruby) are the primary recommended way to instrument application code, letting you define counters, gauges, histograms, and summaries that are registered and exposed automatically for scraping. Option E is correct because Pushgateway is the designated approach for short-lived jobs (batch/cron tasks) that cannot be scraped reliably; the job pushes its metrics to Pushgateway, which then exposes them for Prometheus to scrape.

Option A is not valid because applications should never write directly into Prometheus's storage (TSDB); ingestion happens only via scraping or the remote-write protocol, and direct storage writes bypass the intended data model and lifecycle. Option C is not valid because running SQL queries against an application database is not an instrumentation mechanism; it does not produce Prometheus-format metrics or expose them for scraping, and it conflates data extraction with application instrumentation.

Exam trap

PCA often tests the misconception that Prometheus accepts direct writes to its storage or that SQL queries are a valid instrumentation method — candidates who do not understand Prometheus's pull-based architecture fall for these distractors.

237
MCQmedium

Which operator has the highest precedence in PromQL?

A.Logical OR (or)
B.Addition (+)
C.Equality (==)
D.Exponentiation (^)
AnswerD

Exponentiation (^) binds tighter than multiplication, division, addition and subtraction, and also tighter than comparison and logical operators, so it evaluates first in any PromQL expression. This right-associative operator sits at the top of the precedence table.

Why this answer

In PromQL, the exponentiation operator (^) has the highest precedence among binary operators, higher than multiplicative, additive, comparison, and logical operators. This means expressions like 2 ^ 3 * 4 are parsed as (2 ^ 3) * 4. Knowing precedence is essential for writing correct PromQL without excessive parentheses.

Exam trap

The trap is assuming arithmetic operators share a single precedence tier — candidates often pick addition or equality, forgetting that exponentiation sits above all other binary operators in PromQL.

How to eliminate wrong answers

Option A is wrong because logical OR (or) has the lowest precedence, evaluated after comparison and arithmetic operators. Option B is wrong because addition (+) sits in the additive tier, below multiplication/division and far below exponentiation. Option C is wrong because equality (==) is a comparison operator with lower precedence than arithmetic operators including exponentiation.

238
MCQmedium

You are creating a recording rule to calculate the rate of requests over 5 minutes. Why would you prefer a recording rule over a direct dashboard query?

A.To reduce query latency on dashboards
B.To bypass the retention settings of Prometheus
C.To increase the resolution of the data
D.To automatically send alerts to PagerDuty
AnswerA

A recording rule precomputes the rate expression and stores the result as a new time series, so dashboards read a small precalculated series instead of evaluating the full underlying expression at render time. This reduces query latency on dashboards, satisfying the stated preference.

Why this answer

Recording rules precompute expensive queries, reducing the load on Prometheus and speeding up dashboard loading times.

239
MCQeasy

What is the default port used by node_exporter?

A.9115
B.9090
C.8080
D.9100
AnswerD

Node_exporter listens on TCP port 9100 by default, exposing Prometheus-format metrics at the /metrics endpoint. This satisfies the stem's requirement for the standard default port without any command-line override, so scrapes configured against port 9100 succeed immediately after installation.

Why this answer

The standard Prometheus convention for node_exporter is port 9100.

240
MCQmedium

When configuring Alertmanager to send notifications to Slack, which block defines the routing tree?

A.receivers
B.inhibit_rules
C.route
D.global
AnswerC

The `route` block defines Alertmanager's routing tree, matching alerts to receivers by label. It satisfies the requirement to direct Slack notifications, since child routes inherit and override parent settings, with `receiver: slack` specified at the appropriate node. Without `route`, no alert reaches the Slack receiver.

Why this answer

In Alertmanager's configuration, the route block defines the routing tree that determines how alerts are grouped and which receiver they are sent to. It is the top-level entry point (with child routes for matching) that evaluates alert labels against matchers and dispatches notifications accordingly.

Exam trap

PCA often tests the distinction between route (routing logic) and receivers (notification destinations), so candidates must remember that route decides where alerts go, while receivers define what the destination actually is.

How to eliminate wrong answers

Option A is wrong because receivers defines the notification integrations themselves (Slack, email, PagerDuty) — it is the destination, not the routing logic. Option B is wrong because inhibit_rules suppress notifications when certain other alerts are already firing; they modify behavior but do not define the routing tree. Option D is wrong because global holds defaults like SMTP settings and Slack API URLs that apply across the configuration, not the routing structure.

241
MCQmedium

Why are metric names required to follow a specific character set (e.g., alphanumeric and colons)?

A.For compatibility with PromQL
B.For faster scraping
C.To save disk space
D.To prevent duplicate metrics
AnswerA

PromQL parses metric names as identifiers, so characters such as hyphens or spaces would break query syntax. Restricting names to alphanumerics, underscores and colons keeps them valid tokens, letting the expression engine resolve selectors without quoting or escaping.

Why this answer

Prometheus metric names must match a regex to ensure they are compatible with the query language and internal storage format.

242
MCQmedium

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

A.To delay the initial alert
B.To repeat the alert every X minutes
C.To log the alert to disk
D.To prevent alert flapping
AnswerD

keep_firing_for holds an alert in firing state for a set duration after its condition stops being true, preventing rapid transitions between firing and resolved. This directly addresses flapping, which the stem identifies as the concern.

Why this answer

It keeps an alert in the firing state for a specified duration after the underlying expression is no longer true, which helps prevent flapping.

243
MCQeasy

Which file format does Prometheus use for its main configuration?

A.XML
B.JSON
C.TOML
D.YAML
AnswerD

Prometheus reads its main configuration from a YAML file, conventionally `prometheus.yml`, parsed at startup and on reload. This satisfies the stem's requirement for the native format of the primary config file, where scrape jobs, rule files and service discovery targets are declared.

Why this answer

Prometheus configuration is strictly defined in YAML format.

244
MCQmedium

Which metric type is best for reporting the number of requests received by a service?

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

A counter is monotonically increasing, so each received request increments it and never resets except on process restart. This satisfies the stem's request-counting requirement, letting rate() or increase() derive requests per second across any window.

Why this answer

Counters are monotonic; they only go up, which is perfect for request counts.

245
MCQeasy

What is the result of applying a range selector like [5m] to a gauge metric?

A.A scalar value representing the sum.
B.A range vector containing all data points from the last 5 minutes.
C.An instant vector of the average over 5 minutes.
D.An error, because gauges are not time-series.
AnswerB

A range selector returns a range vector: every sample value with its timestamp falling inside the specified window, rather than a single instant value. Applying [5m] to a gauge therefore yields all points from the preceding five minutes.

Why this answer

Applying a range selector like [5m] to a gauge metric in PromQL returns a range vector containing all samples for that metric over the last 5 minutes. Range vectors are the input required by functions like rate(), increase(), and avg_over_time(). The selector does not aggregate or reduce the data — it simply collects the time series samples in the window.

Exam trap

The trap is confusing range vectors with instant vectors or scalars — candidates pick 'average over 5 minutes' because they mentally apply an aggregation that the selector itself does not perform.

How to eliminate wrong answers

Option A is wrong because a range selector does not produce a scalar sum; aggregation functions like sum() would be needed, and even then the result is an instant vector, not a scalar. Option C is wrong because an instant vector of the average requires an explicit aggregation function such as avg_over_time(metric[5m]), not just the range selector. Option D is wrong because gauges are absolutely time-series data in Prometheus — the range selector works on any metric type, including gauges, counters, and histograms.

246
Multi-Selecthard

Which THREE labels are often considered part of the default Prometheus ecosystem metrics?

Select 3 answers
A.group
B.le
C.owner
D.job
E.instance
AnswersB, D, E

The le label is attached by Prometheus when recording histogram buckets, encoding each bucket's upper bound. It forms part of the default ecosystem label set alongside job and instance, so it satisfies the stem's requirement for a standard ecosystem label.

Why this answer

Option B (le) is correct because it is the standard label Prometheus attaches to histogram bucket series to indicate the inclusive upper bound of each bucket (e.g., le="0.5"), and it is essential for histogram_quantile() calculations. Option D (job) is correct because Prometheus automatically adds a job label to every scraped target, derived from the scrape configuration's job_name, identifying the logical service or scrape group. Option E (instance) is correct because Prometheus automatically attaches an instance label representing the specific target endpoint (host:port) that was scraped, distinguishing individual replicas within a job.

Options A (group) and C (owner) are not part of the default Prometheus ecosystem labels; they are not injected by Prometheus during scraping and are not standard conventions used by PromQL functions or service discovery metadata.

247
MCQmedium

When performing a vector-to-vector binary operation between two instant vectors of different label sets, which modifier allows matching on a subset of common labels?

A.group_left(...)
B.ignoring(...)
C.matching(...)
D.on(...)
AnswerD

The `on(...)` modifier restricts matching to the labels you list, so vectors with differing label sets still pair up on that shared subset. Without it, Prometheus requires identical label sets for vector-to-vector binary operations, returning no results. This directly satisfies the stem's constraint of matching on common labels only.

Why this answer

The 'on(...)' modifier in PromQL allows vector-to-vector binary operations to match on a specified subset of labels, ignoring all other labels. When two instant vectors have different label sets, 'on(label1, label2)' restricts matching to only those labels, enabling the operation to proceed. This is the correct modifier for matching on a subset of common labels.

Exam trap

PCA often tests the difference between 'on' and 'ignoring' — candidates may pick 'ignoring' thinking it matches on a subset, but it actually excludes labels, while 'on' explicitly selects the matching labels.

How to eliminate wrong answers

Option A is wrong because group_left(...) is used for many-to-one matching, not for specifying a subset of labels to match on — it is a grouping modifier, not a matching modifier. Option B is wrong because ignoring(...) excludes specified labels from matching, which is the opposite of matching on a subset. Option C is wrong because 'matching(...)' is not a valid PromQL keyword — the correct keywords are 'on' and 'ignoring'.

248
MCQeasy

Which annotation is commonly used to provide a human-readable description in an alert?

A.description
B.severity
C.instance
D.job
AnswerA

The 'description' annotation is used to provide details about the alert.

Why this answer

The 'summary' or 'description' annotations are standard practices for providing context in alert notifications.

249
Multi-Selecthard

Which THREE of the following are components of a Prometheus alert state?

Select 3 answers
A.muted
B.inactive
C.firing
D.pending
E.sleeping
AnswersB, C, D

An alert enters the inactive state when its expression evaluates to false, meaning no alert instance exists for that series. This satisfies the stem's requirement for a genuine Prometheus alert state, alongside pending and firing, as defined by the Prometheus alerting lifecycle.

Why this answer

In Prometheus, an alert rule transitions through three defined states: B. inactive, meaning the alert's expression evaluates to false and no alert is active; D. pending, meaning the expression has become true but the alert has not yet been true for the configured 'for' duration; and C. firing, meaning the condition has remained true for the full 'for' duration and the alert is now actively firing and sent to Alertmanager. These three states (inactive, pending, firing) are the complete set of alert states tracked by the Prometheus alerting engine. The unmarked options A. muted and E. sleeping are not Prometheus alert states; muting is an Alertmanager concept (silences/mute timers) applied to notifications, and 'sleeping' is not a Prometheus alert state at all.

250
MCQmedium

You need to ensure that an alert remains 'firing' for 5 minutes before the Alertmanager is notified. Which field in the Prometheus alerting rule should you configure?

A.pending_duration
B.for
C.delay
D.hold_time
AnswerB

The `for` field sets a pending duration, during which the alert must remain continuously firing before Alertmanager receives it. Configuring `for: 5m` satisfies the stem's requirement to delay notification until the condition has persisted five minutes, filtering transient spikes that would otherwise trigger premature alerts.

Why this answer

The 'for' field in a Prometheus alerting rule specifies the duration for which a condition must be true before the alert transitions from 'pending' to 'firing'.

251
MCQeasy

An SRE team is transitioning from traditional logs to metrics for performance monitoring. Which scenario best justifies using metrics over logs?

A.Auditing user access attempts for compliance.
B.Tracking the request rate per second on a web server.
C.Storing the payload of a failed transaction for later inspection.
D.Recording the stack trace of a Java application crash.
AnswerB

Metrics are numeric time-series suited to aggregation and rate calculations, so request rate per second is computed cheaply and stored at low cardinality. Logs would require parsing each entry to derive the same count, making metrics the efficient choice for this high-volume, continuously changing measurement.

Why this answer

Metrics are numerical representations of data measured over time, making them efficient for time-series analysis and alerting, whereas logs are better for debugging specific events.

252
Multi-Selecthard

Which THREE of the following are valid label matchers?

Select 3 answers
A.>>
B.==
C.!~
D.=~
E.!=
AnswersC, D, E

The `!~` operator is a valid PromQL label matcher, selecting time series whose label value does not match a given regular expression. It satisfies the stem's requirement by providing the negated regex-matching axis, complementing `=~`, `!=` and `=` as the fourth supported matcher type.

Why this answer

In Prometheus-style label matching, the valid matchers are = (equality), != (inequality), =~ (regex match), and !~ (negative regex match), so C (!~), D (=~), and E (!=) are all correct. C (!~) is right because it selects series whose label value does not match the given regular expression, e.g. job!~"api.*". D (=~) is right because it selects series whose label value matches the regular expression, e.g. job=~"api.*".

E (!=) is right because it selects series whose label value differs from the given string, e.g. job!="api". Options A (>>) and B (==) are not valid matchers: >> is not a PromQL label operator at all, and == is a comparison operator used in expressions, not a label matcher.

253
MCQhard

You need to prevent an alert from firing if a maintenance window is active. How should you approach this in Alertmanager?

A.Delete the alerting rule
B.Modify the routing tree
C.Use a Silence
D.Add a 'skip' label to the rule
AnswerC

A Silence matches alerts by label set and suppresses notifications for a defined time window, which maps directly onto a scheduled maintenance period. Unlike inhibition, which depends on another firing alert, a Silence is time-bounded and configured in advance, satisfying the maintenance-window constraint.

Why this answer

Silences are the standard way to prevent specific alerts from firing during a known maintenance period.

254
Multi-Selecthard

Which THREE of the following are valid Prometheus TSDB file types?

Select 3 answers
A.chunks
B.sql
C.index
D.json
E.wal
AnswersA, C, E

Prometheus TSDB persists time-series samples in immutable `chunks` segment files, which hold compressed sample data for a fixed time window before being compacted. This satisfies the stem's requirement for a valid TSDB file type, since chunks are written directly by the head block and queried during reads.

Why this answer

Option A (chunks) is correct because Prometheus stores compressed time-series samples in chunk files (e.g., 000001) within each block directory in its TSDB. Option C (index) is correct because each TSDB block contains an index file that maps series labels to their chunk locations, enabling efficient lookups. Option E (wal) is correct because Prometheus uses a write-ahead log (the wal directory with segment files like 00000000) to durably record incoming samples before they are compacted into persistent blocks.

Options B (sql) and D (json) are not valid Prometheus TSDB file types: Prometheus does not use SQL database files for its storage engine, and JSON is used only for configuration, API responses, and exposition formats, not as an internal TSDB file format.

255
MCQeasy

What is the purpose of the 'up' metric?

A.To show system uptime
B.To measure request latency
C.To track CPU usage
D.To indicate if a target is reachable
AnswerD

Prometheus synthesises the up metric per scrape target, recording 1 when the scrape succeeds and 0 when it fails. It therefore reports reachability of each configured target, satisfying the stem's requirement to detect whether a target can be scraped.

Why this answer

The 'up' metric is 1 if the target was successfully scraped and 0 otherwise.

256
MCQmedium

You have a recording rule that references a metric that doesn't exist. What is the impact?

A.Prometheus logs a critical error
B.The rule evaluation results in no data
C.The entire server crashes
D.The rule is automatically disabled
AnswerB

A recording rule referencing a non-existent metric produces no output series, because the expression evaluates against an empty vector and yields nothing. This satisfies the stem's impact directly: no data is written, so dependent dashboards and alerts querying that recorded series return empty results rather than errors.

Why this answer

The recording rule will be evaluated, but because the expression returns no data, no new time series will be created for that rule.

257
MCQhard

When executing a subquery in PromQL, such as 'max_over_time(rate(http_request_total[5m])[30m:1m])', what does the resolution parameter ('1m') specify?

A.The smoothing factor applied to eliminate high-frequency noise.
B.The time-to-live for cached subquery results in Prometheus storage.
C.The evaluation step size at which the inner expression is run across the subquery window.
D.The minimum scrape interval of the target exporter.
AnswerC

The resolution parameter sets the step interval at which the inner range-vector expression is evaluated across the subquery's window, producing a series that the outer max_over_time() then aggregates over. It is not the lookback delta nor the outer range.

Why this answer

The resolution inside subquery brackets specifies the evaluation step size at which the inner expression is evaluated within the subquery range.

258
MCQmedium

When implementing a custom exporter, what format must the output follow to be correctly scraped by Prometheus?

A.JSON
B.XML
C.Prometheus Text Format
D.Binary Protobuf
AnswerC

Prometheus scrapes metrics endpoints expecting the Prometheus Text Format, a line-based exposition syntax of metric name, optional labels and a sample value. A custom exporter emitting JSON, CSV or XML cannot be parsed by the scrape pipeline, so the text format satisfies the stem's scraping requirement.

Why this answer

Prometheus requires a text-based format where each metric is represented by lines, including name, labels, and values.

259
Multi-Selectmedium

Which TWO of the following are valid Alertmanager configuration blocks?

Select 2 answers
A.route
B.receivers
C.scrape_configs
D.targets
E.rules
AnswersA, B

route is a top-level Alertmanager block defining the routing tree that matches alerts by label and dispatches them to child routes or receivers. It is required for alert delivery, making it a valid configuration block.

Why this answer

Option A, route, is a valid top-level Alertmanager configuration block that defines the routing tree, specifying how alerts are grouped, matched, and dispatched to receivers. Option B, receivers, is also a valid top-level Alertmanager block that lists named notification integrations (such as email, Slack, or PagerDuty) that routes can reference. Options C (scrape_configs), D (targets), and E (rules) are not Alertmanager configuration blocks: scrape_configs and targets belong to Prometheus's scrape configuration, and rules is a Prometheus/recording-and-alerting rule file concept, not an Alertmanager config block.

260
MCQeasy

What is the primary role of the 'Alertmanager'?

A.To manage and route alerts generated by Prometheus.
B.To store long-term metric data.
C.To scrape metrics from targets.
D.To visualize metrics in dashboards.
AnswerA

Alertmanager receives alerts pushed from Prometheus and handles deduplication, grouping, silencing and routing to receivers such as email or Slack. It satisfies the stem's routing requirement, sitting downstream of Prometheus rather than performing the metric evaluation itself.

Why this answer

Alertmanager is responsible for grouping, silencing, and routing alerts to external systems like PagerDuty or email.

261
MCQmedium

You are monitoring server hardware metrics using node_exporter. You observe that the metrics are not showing up in Prometheus. Which initial troubleshooting step is most effective?

A.Verify node_exporter is listening on the expected port and accessible.
B.Increase the scrape interval in the Prometheus configuration.
C.Disable all collectors in node_exporter to reduce overhead.
D.Check if the Prometheus server is running in high availability mode.
AnswerA

If node_exporter is not running or bound to a different interface, Prometheus scrapes will fail silently, so confirming the listener and port reachability isolates the fault before investigating scrape configuration or firewall rules. This directly tests the stem's missing-metrics symptom at its source.

Why this answer

The node_exporter must be running and listening on the expected port (9100 by default) for the Prometheus server to scrape it. Verifying the port ensures the endpoint is reachable.

262
MCQhard

What is the behavior of the 'absent()' function?

A.It masks null values
B.It returns 1 if the metric is missing
C.It returns 1 if the metric exists
D.It deletes the metric
AnswerB

absent() returns an empty vector when the given instant vector has samples, and returns a single-element vector with value 1 when the selector matches nothing, letting alerting rules fire on missing metrics such as a target that stopped reporting.

Why this answer

absent() returns a vector with a single element if the provided expression has no results.

263
Multi-Selecthard

Which THREE are true regarding the Prometheus TSDB?

Select 3 answers
A.It uses an inverted index for fast searching.
B.It stores data in blocks of time.
C.It uses a B-tree for all queries.
D.It is a relational database.
E.It maintains a Write Ahead Log (WAL).
AnswersA, B, E

Prometheus TSDB maintains an inverted index mapping label pairs to posting lists of series IDs, enabling rapid label-based lookups without scanning every series. This satisfies the requirement for fast searching across high-cardinality metrics, as queries resolve matching series directly from the index before reading chunks.

Why this answer

It uses blocks, WAL, and index files, and it is optimized for time-series data.

264
Multi-Selectmedium

Which TWO of the following are valid ways to run Prometheus?

Select 2 answers
A.As a browser extension
B.As a container
C.As a binary
D.As a database engine library
E.As a kernel module
AnswersB, C

Running Prometheus as a container satisfies the portability constraint, packaging the server and its dependencies into a single image deployable via Docker or Kubernetes. Configuration and time-series data persist through mounted volumes, so the TSDB survives restarts. This decouples Prometheus from the host, enabling consistent deployment across environments.

Why this answer

Option B is correct because Prometheus is commonly deployed as a container (e.g., the official prom/prometheus Docker image) running its server process in an isolated environment. Option C is correct because Prometheus ships as a standalone compiled Go binary that can be downloaded and executed directly on a host without any container runtime. Option A is wrong because Prometheus is a server-side monitoring system, not a browser extension.

Option D is wrong because Prometheus is a standalone time-series database and monitoring server, not a library embedded into a database engine. Option E is wrong because Prometheus runs entirely in user space and is never implemented as a kernel module.

265
MCQmedium

What is the primary operational difference between the 'rate()' and 'irate()' functions in PromQL?

A.rate() can be used with instant vectors, whereas irate() requires range vectors.
B.irate() automatically accounts for counter resets, whereas rate() does not.
C.irate() supports gauges, while rate() only supports counters.
D.rate() averages the per-second rate over the entire specified range vector, while irate() calculates the rate based on the last two data points in the range vector.
AnswerD

Both functions return per-second rates, but the axis of difference is the sample window: rate() divides the counter increase across the whole range vector, smoothing spikes, whereas irate() uses only the final two samples, giving the instantaneous rate.

Why this answer

rate() calculates the average per-second rate over the whole range vector, smoothing spikes, whereas irate() calculates the instantaneous rate using only the last two points.

Page 3

Page 4 of 4

All pages