Files
compose-anything/src/node-exporter
2025-11-10 19:55:44 +08:00
..
2025-10-06 21:48:39 +08:00
2025-11-10 19:55:44 +08:00
2025-10-06 21:48:39 +08:00
2025-11-08 21:57:17 +08:00

Node Exporter

English | 中文

This service deploys Prometheus Node Exporter, which exposes hardware and OS metrics from *NIX kernels.

Services

  • node-exporter: Prometheus Node Exporter service

Environment Variables

Variable Name Description Default Value
NODE_EXPORTER_VERSION Node Exporter version v1.8.2
NODE_EXPORTER_PORT_OVERRIDE Host port mapping 9100

Please modify the .env file as needed for your use case.

Usage

Start Node Exporter

docker compose up -d

Access Metrics

Configure Prometheus

Add this scrape config to your Prometheus configuration:

scrape_configs:
  - job_name: 'node'
    static_configs:
      - targets: ['localhost:9100']

Metrics Collected

Node Exporter collects a wide variety of system metrics:

  • CPU: usage, frequency, temperature
  • Memory: usage, available, cached
  • Disk: I/O, space usage
  • Network: traffic, errors
  • File system: mount points, usage
  • Load: system load averages
  • And many more

Network Mode

For more accurate metrics, you can run Node Exporter with host network mode. Uncomment in docker-compose.yaml:

network_mode: host

Note: When using host network mode, port mapping is not needed.

Notes

  • Node Exporter should run on each host you want to monitor
  • The service needs access to host filesystem and processes
  • Metrics are exposed in Prometheus format
  • No authentication is provided by default

Security

  • Bind to localhost only if running Prometheus on the same host
  • Use firewall rules to restrict access to the metrics endpoint
  • Consider using a reverse proxy with authentication for production
  • Monitor access logs for suspicious activity

License

Node Exporter is licensed under Apache License 2.0. See Node Exporter GitHub for more information.