PCA PCA Exporters & Instrumentation 1 — Questions and Answers
Question 1: What is the role of a Prometheus exporter?
- It translates metrics from a third-party system into the Prometheus exposition format and exposes them on an HTTP endpoint (Correct answer)
- It exports Prometheus TSDB blocks to an external backup system
- It forwards Prometheus alerts to external notification channels
- It converts Prometheus metrics to Grafana JSON format
Correct answer: It translates metrics from a third-party system into the Prometheus exposition format and exposes them on an HTTP endpoint
An exporter is a bridge that reads metrics from a system that doesn't natively support Prometheus and exposes them in Prometheus text format for scraping.
Question 2: Which exporter is the standard choice for exposing Linux/Unix OS-level metrics like CPU, memory, and disk to Prometheus?
- node_exporter (Correct answer)
- process_exporter
- cadvisor
- blackbox_exporter
Correct answer: node_exporter
The node_exporter exposes hardware and OS metrics from /proc and /sys on Linux hosts in Prometheus exposition format.
Question 3: What Prometheus metric type should you use to track a value that can both increase and decrease, such as the number of active connections?
- Gauge (Correct answer)
- Counter
- Histogram
- Summary
Correct answer: Gauge
Gauges represent values that can arbitrarily go up or down, making them ideal for point-in-time measurements like queue depth or active connections.
Question 4: In Prometheus client libraries, what does calling `Inc()` on a Counter do?
- Increments the counter value by 1 (Correct answer)
- Initializes the counter at 1 and resets it on subsequent calls
- Increments the counter by the current timestamp in milliseconds
- Decrements the counter by 1 (alias for Dec())
Correct answer: Increments the counter value by 1
Calling Inc() on a Prometheus Counter adds exactly 1 to its value; use Add(n) to increment by an arbitrary positive amount.
Question 5: What does the Prometheus blackbox_exporter do?
- Probes external endpoints via HTTP, TCP, ICMP, or DNS and reports availability and latency metrics (Correct answer)
- Exports metrics from black-box encrypted data stores
- Monitors Prometheus itself for internal health metrics
- Scrapes metrics from containers without instrumentation
Correct answer: Probes external endpoints via HTTP, TCP, ICMP, or DNS and reports availability and latency metrics
The blackbox_exporter performs synthetic probing of endpoints and exposes probe success, response time, and status code as Prometheus metrics.
Question 6: Which Prometheus metric type is best suited for measuring request latency distributions with configurable quantile calculations?
- Summary (Correct answer)
- Histogram
- Gauge
- Counter
Correct answer: Summary
Summary calculates streaming quantiles (e.g., p50, p99) client-side and exposes them directly, making it suited when you need accurate per-instance quantiles.
What is the role of a Prometheus exporter?