Courseiva

CCNA Prometheus Fundamentals Questions

55 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 allows Prometheus to interface with the Kubernetes API for dynamic discovery.

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 determines the labels used to bundle alerts.

Why this answer

The 'group_by' field in the route block determines how alerts are grouped into notifications.

3
MCQhard

If you have a scrape_interval of 15s, what is the recommended minimum scrape_timeout?

A.5s
B.10s
C.30s
D.15s
AnswerB

It is standard practice to set the timeout to a significant fraction of the interval, often 10s for a 15s interval.

Why this answer

The timeout should generally be slightly less than or equal to the scrape_interval, but it must be sufficient to allow the target to respond.

4
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

Prevents parsing.

Why this answer

Scrapes fail on network timeout, 404/500 errors, or if the target returns invalid text format.

5
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

Core functionality.

Why this answer

The API allows querying data, checking target status, and getting rule info.

6
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

Uses DNS lookups.

Why this answer

Prometheus supports multiple SD mechanisms, including file-based and cloud-native providers.

7
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 allows offloading data to long-term storage providers.

Why this answer

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

8
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

Indicates scrape success.

Why this answer

Prometheus adds specific metadata labels such as up, scrape_duration, and scrape_samples_scraped.

9
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 watches files for changes in target definitions.

Why this answer

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

10
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

rule_files contain the alerting and recording rule logic.

Why this answer

rule_files point to recording and alerting rules that Prometheus evaluates.

11
MCQeasy

What is the primary language used to query Prometheus data?

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

PromQL is the standard query language for Prometheus.

Why this answer

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

12
MCQeasy

What is the default port that Prometheus listens on?

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

Prometheus defaults to port 9090.

Why this answer

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

13
Multi-Selectmedium

Which TWO of the following labels are specifically associated with Histograms?

Select 2 answers
A.percentile
B.sum
C.le
D.quantile
E.range
AnswersB, C

Metric suffix for sums.

Why this answer

Histograms use 'le' for buckets and 'sum'/'count' for total metrics.

14
MCQmedium

You want to rename a metric during the scrape process. Which configuration block is appropriate?

A.scrape_configs
B.remote_write
C.target_relabel_configs
D.metric_relabel_configs
AnswerD

metric_relabel_configs allows modifying labels of existing metrics.

Why this answer

relabel_configs is the correct way to modify metric labels (including __name__) before they are ingested.

15
MCQeasy

What label is automatically added by Prometheus to all scraped metrics?

A.instance
B.region
C.job
D.host
AnswerA

The instance label reflects the target address.

Why this answer

Prometheus automatically attaches the 'instance' label to identify the target source.

16
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 handles the full lifecycle of alerts.

Why this answer

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

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

18
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

Precomputing results avoids recalculating them on every query.

Why this answer

Recording rules precompute expensive queries and store them as new series, improving performance.

19
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

Dropping labels prevents high-cardinality metrics from being stored in TSDB.

Why this answer

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

20
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 that certain data should be ignored.

Why this answer

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

21
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

High variety of unique strings.

Why this answer

High cardinality often comes from user-provided IDs, timestamps in labels, or dynamic URL parameters.

22
Multi-Selectmedium

Which TWO of the following can be modified in 'relabel_configs'?

Select 2 answers
A.scrape interval
B.target labels
C.retention period
D.metric names
E.alerting logic
AnswersB, D

Standard usage.

Why this answer

Relabeling can modify any label, including the address or metric name.

23
MCQeasy

What is the default value for the scrape interval?

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

The global default scrape interval is 1 minute.

Why this answer

The default scrape interval in Prometheus is 1 minute.

24
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

The server processes recording and alerting rules.

Why this answer

Prometheus primarily scrapes metrics and evaluates rules.

25
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_configs allows per-job interval configuration.

Why this answer

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

26
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 WAL ensures that data in memory can be recovered after a crash.

Why this answer

The Write-Ahead Log (WAL) records incoming samples before they are committed to blocks.

27
MCQhard

What is the difference between a Histogram and a Summary?

A.Histograms use buckets for quantile estimation
B.Histograms are computed on the client
C.Summaries are computed on the server
D.Summaries cannot be aggregated
AnswerA

Histograms aggregate counts into predefined buckets.

Why this answer

Histograms provide aggregated quantiles on the server side via buckets, while Summaries calculate quantiles on the client side.

28
MCQmedium

Which operator performs a set union in PromQL?

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

or returns the union.

Why this answer

The 'or' operator returns the union of two vectors.

29
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

Prometheus treats different label sets as entirely different series.

Why this answer

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

30
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

Prometheus uses $1 for the first captured group in replacement strings.

Why this answer

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

31
MCQmedium

Which configuration parameter limits the number of series in the head block?

A.max_series
B.storage.tsdb.head-series-limit
C.series_limit
D.max_cardinality
AnswerB

This flag limits the active series in memory.

Why this answer

The 'storage.tsdb.head-series-limit' flag helps prevent OOM by capping series count.

32
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 consists of a float64 value and a millisecond-precision timestamp.

Why this answer

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

33
MCQeasy

What is the default retention period for Prometheus data?

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

15 days is the default storage retention.

Why this answer

The default retention for local Prometheus storage is 15 days.

34
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

Stale metrics persist until deleted.

Why this answer

Pushgateway is for batch jobs and requires manual deletion of metrics.

35
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

A timeout results in a failed scrape event.

Why this answer

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

36
MCQhard

When using 'remote_write', how does Prometheus ensure data delivery?

A.It uses a retry mechanism with exponential backoff
B.It writes to the WAL first
C.It disables local storage
D.It requires manual intervention on failure
AnswerA

Remote write implements retries to handle temporary network issues.

Why this answer

Prometheus uses an internal queue and retry logic to ensure delivery to remote endpoints.

37
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() provides the per-second increase of a counter.

Why this answer

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

38
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

Essential step.

Why this answer

To expose metrics, you need to define a collector, register it with a registry, and serve it via an HTTP endpoint.

39
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 allows transient jobs to push metrics to a persistent location.

Why this answer

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

40
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 multiple identical Prometheus servers is the standard way to achieve HA.

Why this answer

Prometheus instances are typically run in parallel to provide HA; there is no single 'scaling' component.

41
MCQhard

You observe data gaps in your Prometheus graph after increasing the scrape interval. What is the most likely cause?

A.TSDB block corruption
B.Stale markers not being processed
C.The scrape_timeout is shorter than the time taken to fetch metrics
D.Too many labels on the metric
AnswerC

If the scrape takes longer than the timeout, the scrape fails, resulting in gaps.

Why this answer

If the scrape interval is too long, the 'scrape_duration' may exceed the interval or cause stale data handling issues.

42
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

Standard type.

Why this answer

Prometheus supports Gauges and Counters as primary metric types.

43
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

Global default.

Why this answer

Global configuration includes scrape interval and evaluation interval.

44
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 is the root of the alerting decision tree.

Why this answer

The 'route' block defines the top-level tree for incoming alerts.

45
MCQhard

You have a metric that is a gauge and fluctuates. What happens if you use the 'rate()' function on a gauge?

A.It throws an error during query evaluation
B.It calculates the average change
C.It works normally
D.It calculates the derivative
AnswerA

The rate() function requires a counter and will error on gauges.

Why this answer

rate() is specifically designed for counters; it will not behave as expected on gauges and usually returns an error or empty result.

46
Multi-Selecthard

Which THREE factors influence Prometheus memory usage?

Select 3 answers
A.Number of alerts
B.Number of dashboards
C.WAL size
D.Number of active time series
E.Scrape interval
AnswersA, C, D

Alert evaluation consumes memory.

Why this answer

Memory is consumed by the number of series, the size of the WAL, and the number of active alerts.

47
MCQeasy

Which file format does Prometheus use for its main configuration?

A.XML
C.TOML
D.YAML
AnswerD

Prometheus uses YAML for its primary configuration file.

Why this answer

Prometheus configuration is strictly defined in YAML format.

48
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

Counters track cumulative events.

Why this answer

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

49
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

Standard for histograms.

Why this answer

While 'job' and 'instance' are standard, 'group' is not a standard automatic label.

50
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

Normal state.

Why this answer

Alerts transition through inactive, pending, and firing states.

51
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

Stores compressed time series data.

Why this answer

The TSDB architecture includes chunks, index, and WAL files.

52
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

The 'up' metric reflects scrape success status.

Why this answer

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

53
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

Defines the alerting tree.

Why this answer

Alertmanager config includes global settings, route definitions, and receivers.

54
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() checks for the existence of time series.

Why this answer

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

55
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

Common deployment pattern.

Why this answer

Prometheus can run as a standalone binary or inside a container.

Ready to test yourself?

Try a timed practice session using only Prometheus Fundamentals questions.