Courseiva

CCNA Instrumentation And Exporters Questions

57 questions · Instrumentation And Exporters topic · 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

Correct.

Why this answer

Node exporter is designed for *NIX systems and exposes metrics on port 9100.

2
MCQmedium

You need to monitor the duration of database queries. Which metric type is best for calculating quantiles on the server side?

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

Histograms allow for the calculation of quantiles on the server side via buckets.

Why this answer

Summaries calculate configurable quantiles on the client side, while Histograms require server-side calculations.

3
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

Prometheus pulls metrics from the exporter.

Why this answer

The Prometheus server is responsible for initiating the scrape request to the exporter.

4
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

Labels are defined during initialization in most client libraries.

Why this answer

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

5
Multi-Selecthard

Which TWO factors directly influence the accuracy of quantile calculations when using Prometheus Summary metrics?

Select 2 answers
A.The total number of instances scraping the metric.
B.The configured quantiles (e.g., 0.9, 0.99).
C.The CPU architecture of the client host.
D.The number of buckets defined in the configuration.
E.The sliding time window for observation calculation.
AnswersB, E

The chosen quantiles determine what the client tracks.

Why this answer

Summaries compute quantiles on the client side, and accuracy is determined by the configured quantiles and the sliding time window over which they are calculated.

6
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

This module specifically validates HTTP 2xx response codes.

Why this answer

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

7
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

Correct.

Why this answer

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

8
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

Because quantiles are calculated at the source, they cannot be correctly averaged or merged.

Why this answer

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

9
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

Used to instrument the code.

Why this answer

The process involves the application (instrumented via client library), the exporter (or the application itself), and the Prometheus server (the scraper).

10
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

The counter increments for every bucket greater than or equal to the observation.

Why this answer

Histograms are cumulative. A value of 0.7 falls into the 1 and 5 buckets (because 0.7 <= 1 and 0.7 <= 5).

11
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

Counters are designed for monotonically increasing values like request counts.

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.

12
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

Correct.

Why this answer

Common methods include using official client libraries, using exporters, and the textfile collector.

13
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

This is the idiomatic way to expose metrics in the Python library.

Why this answer

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

14
MCQeasy

Which of the following is a correct unit suffix for Prometheus metrics?

A._total
B._sum
C._count
D._seconds
AnswerD

Units like _seconds or _bytes are recommended.

Why this answer

Prometheus recommends using base units (e.g., seconds for duration, bytes for memory) and appending the unit to the name.

15
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

Correct.

Why this answer

Key factors include avoiding high cardinality, ensuring the metrics are exposed via HTTP, and keeping performance overhead low.

16
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 provides comprehensive hardware and OS metrics.

Why this answer

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

17
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

Correct.

Why this answer

Gauges allow values to fluctuate and are often used for memory, CPU, or queue length.

18
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 provides an intermediary for short-lived jobs to push metrics.

Why this answer

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

19
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 is designed for external probing.

Why this answer

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

20
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

Correct.

Why this answer

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

21
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 is used for metrics that require dimensions (labels).

Why this answer

A Gauge represents a single value, whereas a GaugeVec allows you to have multiple gauges identified by a set of variable labels.

22
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

This allows calculating averages.

Why this answer

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

23
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

Precise quantiles cannot be computed after the fact; one must rely on bucket approximations.

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.

24
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

It tracks how many times the metric has been observed.

Why this answer

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

25
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

This is the correct flag to disable the textfile collector.

Why this answer

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

26
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

The exporter must respond within the defined timeout window.

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.

27
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

NaN is a valid floating point representation for gauge states.

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.

28
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

Correct.

Why this answer

Histograms consist of cumulative counters and allow for server-side quantile calculation.

29
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

This is the standard registration method in the Go client library.

Why this answer

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

30
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

Correct.

Why this answer

Pushgateway is used for batch jobs that finish quickly and for processes that are behind a firewall.

31
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

Correct.

Why this answer

It is used for active probing and supports multiple modules for different protocols.

32
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

Modules encapsulate configuration settings like timeouts and HTTP matchers for specific probes.

Why this answer

The module defines the protocol (e.g., http, tcp, dns) and specific parameters (e.g., timeout, valid status codes) for a probe.

33
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

It uniquely identifies the source of the scrape.

Why this answer

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

34
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

It represents the bucket threshold.

Why this answer

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

35
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

Gauges are designed for values that can fluctuate arbitrarily, such as active connections.

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.

36
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

Including unique identifiers as labels creates a new time series for every single value, leading to cardinality explosion.

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.

37
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

It monitors services from an external perspective.

Why this answer

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

38
Multi-Selectmedium

Which THREE of the following are valid metric types supported natively by Prometheus client libraries?

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

Histogram is a valid native metric type.

Why this answer

The four core metric types in Prometheus are Counter, Gauge, Histogram, and Summary.

39
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

MustRegister is the standard way to register collectors with the default registry.

Why this answer

In client_golang, metrics are registered with a Registry object (often the DefaultRegistry) via the MustRegister or Register function.

40
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

Correct.

Why this answer

Common issues include network connectivity, incorrect scrape configurations, and exporter timeouts.

41
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

Consistency is key to prevent gaps in time series data.

Why this answer

If metrics are not always available, they should still be exposed (perhaps with a null or default value) to ensure consistent scraping.

42
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

Correct.

Why this answer

The four main metric types supported by Prometheus are Counter, Gauge, Histogram, and Summary.

43
MCQhard

You want to monitor the status of a specific SSL certificate via blackbox_exporter. Which module is designed for this?

A.tcp_connect
B.ssl_check
C.http_2xx
D.cert_monitor
AnswerC

The http_2xx module is used to probe TLS certificates.

Why this answer

The http_2xx module, when configured with TLS settings, can check certificate expiry via the probe_ssl_earliest_cert_expiry metric.

44
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

Gauges track fluctuating values like current sessions.

Why this answer

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

45
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

node_exporter collects memory usage stats.

Why this answer

node_exporter is designed to expose hardware and OS-level metrics such as CPU usage, memory usage, and filesystem occupancy.

46
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

These names are reserved by the system.

Why this answer

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

47
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

Label names should be static to keep the number of series manageable.

Why this answer

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

48
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

Gauges are perfect for values that fluctuate over time.

Why this answer

A Gauge represents a numerical value that can arbitrarily go up and down, such as memory usage or temperature.

49
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 cause excessive memory usage and performance degradation.

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.

50
MCQmedium

You need to expose metrics from a legacy application that only logs to a file. What should you do?

A.Use the node_exporter textfile collector
B.None of the above
C.Use a blackbox exporter
D.Use Pushgateway
E.Use a custom exporter
AnswerA

This collector reads metrics from files on disk.

Why this answer

The node_exporter textfile collector is designed to read metrics from a specific directory where you can drop files containing Prometheus-formatted data.

51
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

Counters are the correct metric type for tracking total increments like request counts.

Why this answer

Counters are cumulative metrics that represent a single monotonically increasing counter whose value can only increase or be reset to zero on restart. This is ideal for request counts.

52
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 updates the metric group based on the provided set.

Why this answer

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

53
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

Correct.

Why this answer

Common approaches are using official libraries, custom HTTP exporters, or batch job pushing.

54
MCQeasy

What is the default port used by node_exporter?

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

9100 is the registered default port for node_exporter.

Why this answer

The standard Prometheus convention for node_exporter is port 9100.

55
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

The language syntax requires strictly formatted names.

Why this answer

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

56
MCQmedium

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

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

The Prometheus text exposition format is the standard for custom exporters.

Why this answer

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

57
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

Connectivity to the exporter endpoint is the first requirement for successful scraping.

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.