Which TWO of the following are true about the node_exporter?
Correct.
Why this answer
Node exporter is designed for *NIX systems and exposes metrics on port 9100.
57 questions · Instrumentation And Exporters topic · All types, answers revealed
Which TWO of the following are true about the node_exporter?
Correct.
Why this answer
Node exporter is designed for *NIX systems and exposes metrics on port 9100.
You need to monitor the duration of database queries. Which metric type is best for calculating quantiles on the server side?
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.
When creating a custom exporter, which component is responsible for scraping the data?
Prometheus pulls metrics from the exporter.
Why this answer
The Prometheus server is responsible for initiating the scrape request to the exporter.
When configuring a custom exporter, how do you provide labels to a metric?
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.
Which TWO factors directly influence the accuracy of quantile calculations when using Prometheus Summary metrics?
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.
You are using the blackbox_exporter to monitor an HTTP endpoint. Which module configuration is required to check the HTTP status code?
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.
Which THREE of the following are true about the Prometheus Text Exposition Format?
Correct.
Why this answer
It is line-oriented, supports comments starting with #, and each metric line contains the name, optional labels, and value.
What is the effect of using a 'Summary' metric with client-side quantiles?
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.
Which THREE components are typically involved in the standard Prometheus instrumentation and scraping process?
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).
A Histogram has buckets [0.1, 0.5, 1, 5]. A request takes 0.7 seconds. Which buckets will be incremented?
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).
You need to track the number of requests received by your application. Which metric type should you choose?
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.
Which THREE of the following are standard ways to handle Prometheus metrics?
Correct.
Why this answer
Common methods include using official client libraries, using exporters, and the textfile collector.
When writing a custom exporter in Python, what is the most common way to expose the metrics?
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.
Which of the following is a correct unit suffix for Prometheus metrics?
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.
Which THREE of the following are key design considerations when creating a custom exporter?
Correct.
Why this answer
Key factors include avoiding high cardinality, ensuring the metrics are exposed via HTTP, and keeping performance overhead low.
You are monitoring a Linux server and need to track CPU usage. Which exporter is the standard choice for exposing hardware and OS metrics?
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.
Which TWO of the following are true about the Gauge metric type?
Correct.
Why this answer
Gauges allow values to fluctuate and are often used for memory, CPU, or queue length.
Your application has a short-lived batch job that finishes before the Prometheus server can scrape it. What architectural component should be used?
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.
Which tool would you use to monitor the availability of a website from various geographic locations?
Blackbox exporter is designed for external probing.
Which TWO of the following should be considered when defining metric names?
Correct.
Why this answer
Names should be descriptive and use the unit suffix as per conventions.
When using the Prometheus Go client, what is the difference between a Gauge and a GaugeVec?
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.
If you are using a Histogram, what is the purpose of the '_sum' metric?
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.
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?
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.
What does the `_count` suffix denote in a summary or histogram?
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.
When running node_exporter, how can you disable specific collectors like 'textfile'?
This is the correct flag to disable the textfile collector.
Why this answer
Collectors can be disabled using the --no-collector.<name> flag.
You notice your custom exporter is timing out during scraping. What is the most likely cause?
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.
You are seeing 'NaN' values in your gauge metrics. What does this indicate?
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.
Which TWO of the following are true regarding Prometheus Histograms?
Correct.
Why this answer
Histograms consist of cumulative counters and allow for server-side quantile calculation.
You are instrumenting a Go application. What is the standard way to register a metric?
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.
Which TWO of the following are common reasons to use the Pushgateway?
Correct.
Why this answer
Pushgateway is used for batch jobs that finish quickly and for processes that are behind a firewall.
Which TWO of the following are true about the Blackbox exporter?
Correct.
Why this answer
It is used for active probing and supports multiple modules for different protocols.
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?
Modules encapsulate configuration settings like timeouts and HTTP matchers for specific probes.
What is the purpose of the 'instance' label in Prometheus?
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.
What is the purpose of the 'le' label in a Histogram?
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.
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?
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.
You are troubleshooting high cardinality in your metrics. What is a common cause for this in a custom exporter?
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.
What is the primary function of the 'blackbox_exporter' in a monitoring architecture?
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).
Which THREE of the following are valid metric types supported natively by Prometheus client libraries?
Histogram is a valid native metric type.
Why this answer
The four core metric types in Prometheus are Counter, Gauge, Histogram, and Summary.
When using a Prometheus client library to instrument a Go application, which function call is typically used to register a new metric?
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.
Which THREE of the following are common issues that cause scraping failures?
Correct.
Why this answer
Common issues include network connectivity, incorrect scrape configurations, and exporter timeouts.
What is the recommended approach for metrics that only need to be exposed periodically?
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.
Which THREE of the following are valid metric types in Prometheus?
Correct.
Why this answer
The four main metric types supported by Prometheus are Counter, Gauge, Histogram, and Summary.
You want to monitor the status of a specific SSL certificate via blackbox_exporter. Which module is designed for this?
The http_2xx module is used to probe TLS certificates.
Which metric type is most appropriate for tracking the current total number of active user sessions?
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.
Which THREE of the following are common use cases for the node_exporter?
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.
What is the impact of naming a metric starting with an underscore?
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.
When instrumenting an application, why is it recommended to use a fixed set of label names?
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.
A developer wants to expose a metric that represents the current memory usage of a process. Which type is most appropriate?
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.
Which action should be avoided when creating labels for custom metrics?
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.
You need to expose metrics from a legacy application that only logs to a file. What should you do?
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.
A developer wants to track the total number of requests received by a web service. Which metric type is most appropriate for this requirement?
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.
When using the Pushgateway, what happens if you push a metric with the same name and labels as an existing one?
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.
Which THREE of the following are valid approaches to instrumenting an application?
Correct.
Why this answer
Common approaches are using official libraries, custom HTTP exporters, or batch job pushing.
What is the default port used by node_exporter?
9100 is the registered default port for node_exporter.
Why this answer
The standard Prometheus convention for node_exporter is port 9100.
Why are metric names required to follow a specific character set (e.g., alphanumeric and colons)?
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.
When implementing a custom exporter, what format must the output follow to be correctly scraped by Prometheus?
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.
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?
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.