Courseiva

CCNA Prometheus Fundamentals Questions

44 questions · Prometheus Fundamentals topic · All types, answers revealed

1
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.

2
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.

3
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.

4
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.

5
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.

6
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.

7
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.

8
MCQmedium

Which mechanism allows Prometheus to discover targets by reading a list from a file?

A.dns_sd_configs
B.static_configs
C.consul_sd_configs
D.file_sd_configs
AnswerD

file_sd_configs makes Prometheus read target lists from JSON or YAML files on disk, refreshing them periodically without a restart. This satisfies the stem's constraint of discovering targets from a file rather than via API-based service discovery.

Why this answer

file_sd_configs is designed to read target lists from JSON or YAML files.

9
MCQmedium

What is the purpose of the 'rule_files' configuration?

A.To manage user authentication
B.To define static targets
C.To define alerting and recording rules
D.To configure global retention
AnswerC

The rule_files directive lists the files Prometheus loads to evaluate alerting rules and recording rules. Alerting rules generate alerts sent to Alertmanager; recording rules precompute frequently used expressions into new time series, satisfying the need to define both rule types.

Why this answer

rule_files point to recording and alerting rules that Prometheus evaluates.

10
MCQeasy

What is the primary language used to query Prometheus data?

A.Regex
B.GraphQL
C.PromQL
D.SQL
AnswerC

PromQL is Prometheus's native functional query language, used across the expression browser, HTTP API and alerting rules to select and aggregate time series. It satisfies the stem's requirement as the primary language for querying Prometheus data.

Why this answer

PromQL (Prometheus Query Language) is the functional query language for Prometheus.

11
MCQeasy

What is the default port that Prometheus listens on?

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

Prometheus's server process binds to TCP port 9090 by default, serving its web UI, HTTP API and metrics endpoint there. This is the port scraped for Prometheus's own self-metrics and the one exposed in the default --web.listen-address setting.

Why this answer

9090 is the well-known default port for the Prometheus server web interface.

12
MCQeasy

Which component is responsible for receiving alerts from Prometheus and managing notification delivery?

A.Alertmanager
B.Prometheus Server
C.Exporter
D.Pushgateway
AnswerA

Alertmanager receives alerts pushed by Prometheus and handles their routing, grouping, inhibition and silencing before dispatching notifications to receivers such as email, Slack or PagerDuty. This satisfies the stem's requirement for the component managing notification delivery, since Prometheus itself only evaluates rules and fires alerts.

Why this answer

Alertmanager is the dedicated component for deduplicating, grouping, and routing alerts.

13
MCQhard

When a Prometheus server is restarted, how does it recover the in-memory data?

A.It only keeps the last 5 minutes
B.It reads the WAL
C.It queries the remote store
D.It re-scrapes all targets
AnswerB

The WAL stores data that hasn't been flushed to disk blocks yet.

Why this answer

It replays the Write-Ahead Log (WAL) to reconstruct the in-memory head block.

14
MCQmedium

What is the benefit of using recording rules?

A.They enable alert notifications
B.They improve query performance
C.They bypass TSDB
D.They reduce storage usage
AnswerB

Recording rules precompute expensive or frequently used PromQL expressions and store the results as new time series. Dashboards and alerts then query those precalculated series instead of re-evaluating heavy aggregations across raw data at request time, cutting query latency and load on Prometheus.

Why this answer

Recording rules precompute expensive or frequently-used PromQL expressions and save the result as a new time series, so subsequent queries read the precomputed series instead of re-evaluating the full expression over raw data. This dramatically improves query performance, especially for dashboards and alerts that run the same heavy aggregation repeatedly. They are defined in rule files and evaluated at a configurable `interval`.

Exam trap

The trap is confusing recording rules with alerting rules — both live in rule files and use PromQL, but only alerting rules send notifications, and only recording rules are about query performance.

How to eliminate wrong answers

Option A is wrong because alert notifications come from alerting rules, not recording rules — alerting rules evaluate an expression and fire alerts to Alertmanager, while recording rules only produce new time series. Option C is wrong because recording rules write their output into the TSDB like any other series; they do not bypass it. Option D is wrong because recording rules actually increase storage usage — they add new series on top of the raw data they were derived from; they trade storage for query speed, not the other way around.

15
MCQhard

Your Prometheus server is hitting high memory usage due to high cardinality. Which action is most effective at reducing memory pressure?

A.Increase scrape_interval
B.Drop high-cardinality labels using relabel_configs
C.Use more exporters
D.Enable remote write
AnswerB

Memory scales with the number of distinct label-value series, so cardinality is the constraint. relabel_configs can drop or rewrite labels before ingestion, collapsing many series into fewer and directly cutting the stored time series that drive memory usage.

Why this answer

Reducing label cardinality (e.g., removing unique user IDs) is the primary way to reduce TSDB index size and memory usage.

16
MCQhard

What is the purpose of 'tombstones' in the TSDB?

A.To increase query speed
B.To compress data
C.To mark series for deletion
D.To store WAL snapshots
AnswerC

Tombstones record deleted time ranges within a series, letting Prometheus's TSDB skip those blocks during queries without immediately rewriting data on disk. This satisfies the stem's deletion-marking purpose: the series persists physically, but tombstoned intervals are excluded from reads until compaction removes them.

Why this answer

Tombstones track data points that have been deleted, allowing them to be ignored during queries until they are compacted.

17
Multi-Selecthard

Which THREE of the following are common sources of high cardinality?

Select 3 answers
A.Dynamic URL parameters
B.Unique user IDs
C.Static host names
D.Binary flags
E.Timestamps in labels
AnswersA, B, E

Each distinct dynamic URL parameter value creates its own label set, so cardinality scales with the number of unique parameter combinations. This satisfies the stem's requirement for a common high-cardinality source, since unbounded parameter variation multiplies time series far beyond a fixed label set.

Why this answer

Dynamic URL parameters (A) are a classic high-cardinality source because each distinct parameter value (e.g., session tokens, query strings, or path segments) creates a new unique time series or metric label set. Unique user IDs (B) are also high cardinality since every user generates a distinct label value, causing the number of series to scale with the user base. Timestamps in labels (E) are high cardinality because a timestamp label takes a continuously increasing set of unique values, exploding the series count with every scrape or event.

Static host names (C) are low cardinality because the set of hosts is small and bounded, and binary flags (D) only ever take two values (true/false or 0/1), so neither meaningfully increases cardinality.

Exam trap

The trap is failing to recognize that 'unique' or 'unbounded' values (IDs, timestamps, dynamic paths) are the cardinality killers, while bounded sets (hostnames, booleans) are safe.

18
MCQeasy

What is the default value for the scrape interval?

A.1m
B.10s
C.30s
D.5m
AnswerA

Prometheus defaults its scrape interval to one minute when no explicit value is set, so a target without a custom `scrape_interval` is polled every 60 seconds. This satisfies the stem's request for the default, distinguishing it from shorter intervals such as 15s or 30s that must be configured manually.

Why this answer

The default scrape interval in Prometheus is 1 minute.

19
Multi-Selectmedium

Which TWO of the following are core responsibilities of the Prometheus server?

Select 2 answers
A.Sending SMS alerts
B.Hosting the dashboard UI
C.Evaluating rules
D.Managing user auth
E.Scraping metrics
AnswersC, E

Evaluating rules is a core Prometheus server responsibility: it periodically runs the alerting and recording rules loaded from rule_files, producing alerts and precomputed series. This sits alongside scraping and storing time series in the server's own duties.

Why this answer

Option E is correct because the Prometheus server's primary function is to actively scrape (pull) time-series metrics from instrumented targets over HTTP at configured intervals, storing them in its local TSDB. Option C is correct because the Prometheus server evaluates recording rules and alerting rules against the scraped data; recording rules precompute new time series, and alerting rules generate alerts that are pushed to Alertmanager. Option A is not a Prometheus responsibility—Prometheus only forwards firing alerts to Alertmanager, which handles notification routing and integrations such as SMS or email.

Option B is incorrect because the Prometheus server exposes only a basic expression browser, while rich dashboards are provided by external tools like Grafana. Option D is incorrect because Prometheus has no built-in user authentication or authorization; access control is typically handled by a reverse proxy or an identity-aware proxy in front of it.

20
MCQeasy

Where do you define the scrape interval for a specific target?

A.global section
B.remote_write section
C.alerting section
D.scrape_configs section
AnswerD

Scrape intervals are set per job within `scrape_configs`, where each job's `scrape_interval` overrides the global default. This satisfies the stem's requirement to define the interval for a specific target, since targets are grouped under a job and inherit that job's interval unless individually relabelled.

Why this answer

The scrape_interval can be defined within the scrape_config for that specific job.

21
MCQmedium

Which TSDB component is responsible for ensuring data durability if the server crashes?

A.Tombstone file
B.WAL (Write-Ahead Log)
C.Head block
D.Index file
AnswerB

The write-ahead log persists incoming samples to disk before they reach in-memory blocks, so a crash can be recovered by replaying it. This satisfies the durability requirement, unlike the head block, which is volatile until flushed.

Why this answer

The Write-Ahead Log (WAL) is a crucial component in Prometheus's TSDB that ensures data durability. Before data is written to the in-memory Head block, it is first appended to the WAL on disk. If the server crashes, the WAL can be replayed to recover any data that was not yet persisted to disk.

Exam trap

PCA often tests TSDB internals, and candidates may confuse the WAL with other components like the Head block, not realizing that the WAL is the primary durability mechanism.

How to eliminate wrong answers

Option A is wrong because tombstone files record deletions, not durability. Option C is wrong because the Head block is in-memory and not durable until persisted. Option D is wrong because the index file provides indexing for queries, not crash recovery.

22
MCQmedium

Which operator performs a set union in PromQL?

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

23
MCQhard

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

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

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

Why this answer

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

24
MCQhard

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

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

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

Why this answer

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

25
MCQmedium

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

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

A sample is the smallest unit of data in the Prometheus model: a single float64 value paired with a millisecond-precision timestamp. A time series is an ordered sequence of such samples identified by its metric name and labels.

Why this answer

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

26
MCQeasy

What is the default retention period for Prometheus data?

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

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

Why this answer

The default retention for local Prometheus storage is 15 days.

27
Multi-Selectmedium

Which TWO of the following are true about the Pushgateway?

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

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

Why this answer

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

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

28
MCQmedium

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

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

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

Why this answer

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

29
MCQmedium

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

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

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

Why this answer

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

30
Multi-Selecthard

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

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

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

Why this answer

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

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

Exam trap

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

31
MCQmedium

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

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

The Pushgateway accepts metrics from short-lived jobs that Prometheus cannot reliably scrape within their 30-second lifetime. Because the batch job terminates before a scrape interval elapses, it must push its metrics to the Pushgateway, which retains them for Prometheus to collect afterwards.

Why this answer

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

32
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

33
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.

34
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).

35
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.

36
MCQeasy

Which file format does Prometheus use for its main configuration?

A.XML
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.

37
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.

38
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.

39
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.

40
Multi-Selecthard

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

Select 3 answers
A.chunks
B.sql
C.index
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.

41
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.

42
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.

43
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.

44
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.

Ready to test yourself?

Try a timed practice session using only Prometheus Fundamentals questions.