Blocks · Monitoring

monitor/node-exporter

Prometheus node exporter. The Prometheus node exporter on every node, as a daemonset.

Overview

Runs the upstream node_exporter on every node, exposing the machine's CPU, memory, disk and network metrics for Prometheus. The monitor/prometheus block scrapes it on every node at nodeExporterPort, 9100 by default.

Shape
Daemonset
Reached at
Port on every node
Node package
pkgs.prometheus-node-exporter

Fetched on demand: the first time a block of this type is placed on a node, its agent fetches pkgs.prometheus-node-exporter, built from the node's own nixpkgs so the NixOS binary cache serves it. That first placement needs network access (or a binary cache on the LAN) and waits for the download; later placements on that node start at once.

Example

node-exporter.yaml
apiVersion: expanse.io/v1
kind: Block
metadata:
  name: node-exporter
  namespace: default
spec:
  type: monitor/node-exporter
  strategy:
    kind: DAEMONSET
  resources:
    requests:
      cpu: 50m
      memory: 64Mi
  config:
    port: 9100
$ expanse ctl block apply -f node-exporter.yaml --dry-run   # validate only
$ expanse ctl block apply -f node-exporter.yaml

Configuration

Keys go under spec.config and are checked against the type's JSON Schema when the block is applied. A default is what the block uses when the key is unset.

KeyDefaultMeaning
portnone: always set itTCP port of the metrics endpoint. Unset, the exporter takes a random free port, which Prometheus cannot find; set 9100.
webTelemetryPath/metricsURL path of the metrics endpoint.

Using it

$ curl -s http://<node address>:9100/metrics | head

When a node fails

A daemonset has one replica per node, so there is nothing to move: a failed node's exporter is gone until the node returns.

Limits

  • Collector flags cannot be set.

Source

All block types · Fields every block shares