Courseiva

CCNA Instrumentation And Exporters Questions

51 questions · Instrumentation And Exporters · All types, answers revealed

1
Multi-Selectmedium

Which TWO of the following are true about the node_exporter?

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

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

Why this answer

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

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

Exam trap

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

2
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

3
MCQmedium

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

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

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

Why this answer

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

4
MCQmedium

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

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

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

Why this answer

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

5
Multi-Selectmedium

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

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

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

Why this answer

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

6
MCQmedium

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

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

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

Why this answer

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

7
Multi-Selecthard

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

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

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

Why this answer

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

Exam trap

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

8
MCQhard

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

9
MCQeasy

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

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

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

Why this answer

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

10
Multi-Selecthard

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

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

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

Why this answer

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

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

Exam trap

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

11
MCQmedium

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

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

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

Why this answer

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

12
Multi-Selecthard

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

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

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

Why this answer

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

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

Exam trap

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

13
MCQeasy

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

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

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

Why this answer

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

14
Multi-Selectmedium

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

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

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

Why this answer

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

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

15
MCQhard

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

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

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

Why this answer

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

16
MCQeasy

Which tool would you use to monitor the availability of a website from various geographic locations?

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

blackbox_exporter probes endpoints over HTTP, HTTPS, TCP and ICMP from wherever its instance runs, exposing results as Prometheus metrics. Deploying multiple instances across regions satisfies the stem's geographic requirement, letting you alert on probe_success and latency per location.

Why this answer

The blackbox_exporter is the standard tool for probing the availability of HTTP, TCP, or DNS services.

17
Multi-Selectmedium

Which TWO of the following should be considered when defining metric names?

Select 2 answers
A.Avoid using underscores
B.Use random IDs to ensure uniqueness
C.Use descriptive, clear names
D.Include the unit suffix
E.Include the instance name in the metric
AnswersC, D

Descriptive, clear metric names satisfy the stem's requirement for defining metric names by making each series self-documenting, so engineers can identify what a measurement represents without external context. This reduces ambiguity during querying and alerting, directly supporting maintainability across dashboards and Prometheus-style label sets.

Why this answer

Names should be descriptive and use the unit suffix as per conventions.

18
MCQhard

When using the Prometheus Go client, what is the difference between a Gauge and a GaugeVec?

A.Gauge is faster
B.GaugeVec is for Histograms
C.There is no difference
D.GaugeVec supports labels
AnswerD

GaugeVec wraps a Gauge with a label dimension, exposing one child metric per label-value combination via WithLabelValues. This satisfies the stem's requirement to distinguish the two types: a plain Gauge holds a single unlabelled value, whereas GaugeVec permits per-label tracking, such as by endpoint or status code.

Why this answer

In the Prometheus Go client, a Gauge is a metric that represents a single numerical value that can go up or down, while a GaugeVec is a vector of Gauges that supports labels. The GaugeVec allows you to create multiple Gauge metrics differentiated by label values (e.g., by instance, method, or status), enabling multi-dimensional metrics. This is the key difference: GaugeVec supports labels, whereas a plain Gauge does not.

Exam trap

PCA often tests the difference between scalar metrics and vector metrics, catching candidates who think GaugeVec is for a different metric type (like Histograms) rather than understanding it as a labeled collection of Gauges.

How to eliminate wrong answers

Option A is wrong because performance is not the differentiator — both are implemented similarly, and the overhead of labels is negligible; the choice depends on whether you need multi-dimensional metrics. Option B is wrong because GaugeVec is not for Histograms; Histograms have their own HistogramVec type, and GaugeVec is specifically for gauge metrics with labels. Option C is wrong because there is a clear difference: GaugeVec supports labels and manages a collection of Gauges, while Gauge is a single metric without labels.

19
MCQhard

If you are using a Histogram, what is the purpose of the '_sum' metric?

A.To store the median
B.To store the maximum value
C.To store the sum of observations
D.To store the total count
AnswerC

The '_sum' metric accumulates the total of all observed values, complementing '_count' and '_bucket', which track observation counts and distribution boundaries. It satisfies the requirement to store the summed observations rather than counts or buckets.

Why this answer

The _sum metric provides the sum of all observed values, which allows calculating the average when combined with the _count metric.

20
MCQhard

You have a histogram metric tracking request durations. You need to calculate the 99th percentile across all instances in a cluster. Why is this difficult with standard Prometheus metrics?

A.Histograms can only be used on a single instance.
B.The Prometheus server does not support mathematical operations.
C.Aggregating histograms requires complex math because they track bucket counts, not raw values.
D.Histograms are not designed to be aggregated across multiple labels.
AnswerC

Histogram buckets store cumulative counts per bucket, not individual observations, so the 99th percentile cannot be read directly. Merging histograms across instances requires summing bucket counts and interpolating within the target bucket, which introduces approximation error and cannot recover the true percentile.

Why this answer

Histograms track counts in predefined buckets. Without knowing the exact distribution of values within those buckets, calculating accurate quantiles across multiple instances or time windows is an approximation.

21
MCQmedium

What does the `_count` suffix denote in a summary or histogram?

A.The maximum value
B.The sum of values
C.The total number of samples
D.The current bucket value
AnswerC

The _count suffix exposes the number of observations aggregated into that summary or histogram series, independent of the sum or bucket values. It lets you compute averages and rates by dividing other suffixes by this sample total.

Why this answer

The _count suffix represents the total number of observations made for that specific metric.

22
MCQmedium

When running node_exporter, how can you disable specific collectors like 'textfile'?

A.collector.textfile=false
B.--no-collector.textfile
C.exclude=textfile
D.--disable-textfile
AnswerB

The `--no-collector.textfile` flag disables the textfile collector at startup, satisfying the requirement to switch off a specific collector. node_exporter accepts `--no-collector.<name>` for any registered collector, so the textfile collector is excluded from the metrics endpoint without affecting others.

Why this answer

Collectors can be disabled using the --no-collector.<name> flag.

23
MCQmedium

You notice your custom exporter is timing out during scraping. What is the most likely cause?

A.The metric type is wrong
B.The scrape timeout is too short
C.The port is blocked
D.The label names are incorrect
AnswerB

Prometheus scrapes each target within a configured scrape_timeout; if the exporter's response exceeds that window, the scrape is cancelled and marked as failed. Raising the timeout, or speeding up the exporter's collection, resolves the timeout errors.

Why this answer

If the exporter is overloaded or generating a massive amount of data, the scrape_timeout value in Prometheus might be too low.

24
MCQhard

You are seeing 'NaN' values in your gauge metrics. What does this indicate?

A.A scrape error
B.An undefined gauge state
C.Metric type mismatch
D.Label collision
AnswerB

A NaN gauge value signals an undefined or missing measurement, not a zero reading. The metric exists but its current state cannot be computed, so the gauge renders no valid numeric value. This matches the undefined gauge state the stem describes.

Why this answer

NaN (Not a Number) is a valid value for gauges in Prometheus, often indicating that a value is currently undefined or not applicable.

25
Multi-Selectmedium

Which TWO of the following are true regarding Prometheus Histograms?

Select 2 answers
A.They calculate quantiles client-side
B.They do not use labels
C.They are cumulative
D.They support aggregation across instances
E.They are only for Gauges
AnswersC, D

Histogram buckets are cumulative: each _bucket series counts all observations less than or equal to its upper bound, so values increase monotonically across buckets. This cumulative layout is what enables histogram_quantile() to interpolate quantiles from the bucket counts.

Why this answer

Option C is correct because Prometheus histograms expose cumulative buckets: each bucket with an upper bound le counts all observations less than or equal to that bound, so the counts are monotonically increasing across buckets. Option D is correct because those cumulative bucket counters are plain time series that can be summed across instances with PromQL aggregation operators such as sum by (le), allowing quantiles to be estimated over aggregated data. Option A is wrong because quantile estimation from histograms is done server-side by PromQL's histogram_quantile() function, not client-side.

Option B is wrong because histograms rely on the le label to identify bucket boundaries. Option E is wrong because histograms are their own metric type used for distributions, not a variant of Gauges.

26
MCQmedium

You are instrumenting a Go application. What is the standard way to register a metric?

A.prometheus.MustRegister()
B.prometheus.Enable()
C.prometheus.Set()
D.prometheus.Add()
AnswerA

`prometheus.MustRegister()` adds a collector to the default registry, which the `/metrics` endpoint exposes automatically. It panics on duplicate registration, surfacing programming errors immediately rather than silently dropping the metric. This satisfies the stem's requirement for the standard registration mechanism in the Go client library.

Why this answer

The prometheus.MustRegister() function is the standard way to register custom metrics with the default registry.

27
Multi-Selectmedium

Which TWO of the following are common reasons to use the Pushgateway?

Select 2 answers
A.For batch jobs that run for seconds
B.To monitor long-running servers
C.To act as a reverse proxy
D.When metrics need to be stored in SQL
E.When the application is inaccessible to the Prometheus server
AnswersA, E

Short-lived batch jobs finish before Prometheus can scrape them, so their final metrics would be lost. Pushing those metrics to the Pushgateway preserves them for the Prometheus server to scrape afterwards, satisfying the ephemeral-job constraint.

Why this answer

Option A is correct because short-lived batch jobs that run only for seconds may finish before Prometheus can scrape them, so they push their final metrics to the Pushgateway where Prometheus can collect them later. Option E is correct because when the application or its metrics endpoint cannot be reached directly by the Prometheus server—due to network segmentation, firewalls, or NAT—the application can push metrics to a Pushgateway that Prometheus is able to scrape. Option B is wrong because long-running servers are the standard use case for direct Prometheus scraping, not the Pushgateway.

Option C is wrong because the Pushgateway is a metrics cache, not a reverse proxy for arbitrary traffic. Option D is wrong because Prometheus and the Pushgateway store metrics in their own time-series format, not in SQL databases.

28
Multi-Selectmedium

Which TWO of the following are true about the Blackbox exporter?

Select 2 answers
A.It supports HTTP, TCP, and DNS
B.It is the only exporter for databases
C.It requires a target list in the config
D.It automatically instruments application code
E.It is a passive metric collector
AnswersA, C

The Blackbox exporter performs active probing from outside the target, and its probe modules support HTTP, TCP, DNS, ICMP and gRPC checks. Supporting HTTP, TCP and DNS satisfies the multi-protocol probing capability the question asks about.

Why this answer

Option A is correct because the Blackbox exporter performs active probes over protocols such as HTTP/HTTPS, TCP, ICMP, and DNS, exposing results like probe_success and probe_duration_seconds. Option C is correct because the Blackbox exporter is driven by a target list defined in its configuration (e.g., under modules and targets in blackbox.yml or via relabeling in Prometheus), since it needs to know which endpoints to probe. Option B is wrong because the Blackbox exporter is not a database exporter; database metrics are typically collected by dedicated exporters such as mysqld_exporter or postgres_exporter.

Option D is wrong because the Blackbox exporter does not instrument application code; that is the role of client libraries or agents like the Prometheus client libraries. Option E is wrong because the Blackbox exporter is an active prober that initiates connections, not a passive collector that only scrapes already-exposed metrics.

29
MCQmedium

You need to monitor the availability of a specific web endpoint from external locations using blackbox_exporter. What is the primary purpose of the 'module' configuration in blackbox_exporter?

A.To specify the IP address of the target server.
B.To manage the authentication credentials for the exporter process.
C.To define the protocol-specific behavior and parameters for the probe.
D.To automatically register the exporter with the Prometheus server.
AnswerC

The module block selects the probe type—HTTP, TCP, ICMP or DNS—and its parameters such as preferred IP protocol, timeouts and valid status codes. It therefore determines the protocol-specific behaviour the blackbox_exporter applies when testing the web endpoint.

Why this answer

In blackbox_exporter, a module defines the protocol-specific behavior and parameters for a probe, such as HTTP, TCP, ICMP, or DNS. It specifies details like the HTTP method, headers, expected status codes, timeouts, and TLS settings. This allows the exporter to perform customized checks for different types of endpoints.

Exam trap

PCA often tests blackbox_exporter configuration, and candidates may confuse the module with target specification or authentication, but the module defines the probe's behavior, not the target.

How to eliminate wrong answers

Option A is wrong because the target IP address is specified in the Prometheus scrape configuration or as a parameter to the probe, not in the module. Option B is wrong because authentication credentials are typically configured within the module (e.g., HTTP basic auth), but the primary purpose of the module is broader than just managing credentials. Option D is wrong because automatic registration with Prometheus is not a function of the module; Prometheus discovers targets via service discovery or static configs.

30
MCQmedium

What is the purpose of the 'instance' label in Prometheus?

A.To filter alerts
B.To identify the user
C.To identify the target
D.To identify the job
AnswerC

The instance label records the specific target endpoint scraped, typically host:port, distinguishing multiple replicas or jobs sharing the same metric names. This satisfies the need to identify which individual target produced a given sample during querying and alerting.

Why this answer

It is an automatically added label that identifies the target (host:port) that the metric was scraped from.

31
MCQhard

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

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

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

Why this answer

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

32
MCQhard

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

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

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

Why this answer

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

33
MCQmedium

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

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

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

Why this answer

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

34
MCQmedium

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

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

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

Why this answer

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

35
MCQeasy

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

36
Multi-Selecthard

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

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

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

Why this answer

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

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

Exam trap

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

37
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

38
Multi-Selectmedium

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

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

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

Why this answer

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

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

Exam trap

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

39
MCQeasy

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

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

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

Why this answer

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

40
Multi-Selecteasy

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

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

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

Why this answer

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

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

Exam trap

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

41
MCQmedium

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

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

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

Why this answer

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

42
MCQmedium

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

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

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

Why this answer

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

43
MCQmedium

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

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

A gauge represents a value that can rise or fall arbitrarily, such as current memory usage, which fluctuates as a process allocates and releases memory. Counters and histograms cannot capture this instantaneous, bidirectional measurement correctly.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

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

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

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

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

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

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

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

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

Ready to test yourself?

Try a timed practice session using only Instrumentation And Exporters questions.