How can you use Prometheus Node Exporter?
The Prometheus Node Exporter is a core system-level exporter that exposes hardware and operating system metrics from *nix-based hosts. It collects metrics such as CPU usage, memory, disk I/O, filesystem space, network statistics, and load averages.
It runs as a lightweight daemon on each host and exposes metrics via an HTTP endpoint (default: :9100/metrics), which Prometheus scrapes periodically.
Key clarification:
It does not instrument applications (A).
It does not collect metrics directly from application HTTP endpoints (B).
It is unrelated to HTTP probing tasks --- those are handled by the Blackbox Exporter (D).
Thus, the correct use of the Node Exporter is to collect and expose hardware and OS-level metrics for Prometheus monitoring.
Extracted and verified from Prometheus documentation -- Node Exporter Overview, Host-Level Monitoring, and Exporter Usage Best Practices sections.
Which Alertmanager feature prevents duplicate notifications from being sent?
Deduplication in Alertmanager ensures that identical alerts from multiple Prometheus servers or rule evaluations do not trigger duplicate notifications.
Alertmanager compares alerts based on their labels and fingerprints; if an alert with identical labels already exists, it merges or refreshes the existing one instead of creating a new notification.
This mechanism is essential in high-availability setups where multiple Prometheus instances monitor the same targets.
You'd like to monitor a short-lived batch job. What Prometheus component would you use?
Prometheus normally operates on a pull-based model, where it scrapes metrics from long-running targets. However, short-lived batch jobs (such as cron jobs or data processing tasks) often finish before Prometheus can scrape them. To handle this scenario, Prometheus provides the Pushgateway component.
The Pushgateway allows ephemeral jobs to push their metrics to an intermediary gateway. Prometheus then scrapes these metrics from the Pushgateway like any other target. This ensures short-lived jobs have their metrics preserved even after completion.
The Pushgateway should not be used for continuously running applications because it breaks Prometheus's usual target lifecycle semantics. Instead, it is intended solely for transient job metrics, like backups or CI/CD tasks.
Verified from Prometheus documentation -- Pushing Metrics -- The Pushgateway and Use Cases for Short-Lived Jobs sections.
What does the increase() function do in PromQL?
The increase() function computes the total increase in a counter metric over a specified range vector. It accounts for counter resets and only measures the net change in the counter's value during the time window.
Example:
increase(http_requests_total[5m])
This query returns how many HTTP requests occurred in the last five minutes. Unlike rate(), which provides a per-second average rate, increase() gives the absolute number of increments.
Given the following Histogram metric data, how many requests took less than or equal to 0.1 seconds?
apiserver_request_duration_seconds_bucket{job="kube-apiserver", le="+Inf"} 3
apiserver_request_duration_seconds_bucket{job="kube-apiserver", le="0.05"} 0
apiserver_request_duration_seconds_bucket{job="kube-apiserver", le="0.1"} 1
apiserver_request_duration_seconds_bucket{job="kube-apiserver", le="1"} 3
apiserver_request_duration_seconds_count{job="kube-apiserver"} 3
apiserver_request_duration_seconds_sum{job="kube-apiserver"} 0.554003785
In Prometheus, histogram metrics use cumulative buckets to record the count of observations that fall within specific duration thresholds. Each bucket has a label le (''less than or equal to''), representing the upper bound of that bucket.
In the given metric, the bucket labeled le='0.1' has a value of 1, meaning exactly one request took less than or equal to 0.1 seconds. Buckets are cumulative, so:
le='0.05' 0 requests 0.05 seconds
le='0.1' 1 request 0.1 seconds
le='1' 3 requests 1 second
le='+Inf' all 3 requests total
The _sum and _count values represent total duration and request count respectively, but the number of requests below a given threshold is read directly from the bucket's le value.
Verified from Prometheus documentation -- Understanding Histograms and Summaries, Bucket Semantics, and Histogram Query Examples sections.
James Flores
1 month agoPatricia Martin
2 months agoAmy Baker
2 months agoChristopher Robinson
3 months agoAmy Bailey
3 months agoMonica Mitchell
4 months agoDonald Moore
4 months agoJeffrey Allen
5 months agoJoshua Jones
5 months agoPaul Peterson
6 months agoAshley Thomas
7 months agoElizabeth Lee
6 months agoKevin Sanchez
6 months agoJeffrey Moore
6 months agoJoseph Wright
6 months agoChristopher Brown
6 months agoBurma
7 months agoWynell
7 months agoJohnetta
8 months agoJudy
8 months agoAlysa
8 months agoCatalina
8 months agoMose
9 months agoLelia
9 months agoAlaine
9 months agoAmie
9 months agoCasey
10 months agoBelen
10 months agoElsa
10 months agoDortha
10 months agoJohnson
11 months agoAaron
11 months agoLenna
11 months agoElina
11 months agoYvonne
12 months agoSantos
12 months agoDaniela
1 year agoMiles
1 year agoCarlee
1 year agoTamesha
1 year ago