Node Exporter is a Prometheus exporter for hardware and OS metrics exposed by *NIX kernels, written in Go with pluggable metric collectors. It exposes a wide variety of hardware- and kernel-related metrics such as CPU, memory, disk space, disk I/O, network bandwidth, and more.
This Node Exporter distribution is provided by the Sourcemation packaging team, built on a secure Debian 13 Slim base image.
Run a temporary container with Node Exporter:
docker run --rm -it -p 9100:9100 sourcemation/node_exporter:latest
The Node Exporter metrics endpoint will be available at http://localhost:9100/metrics.
Run Node Exporter with persistent storage for textfile collector:
docker run -d --name node_exporter \
-p 9100:9100 \
-v /path/to/textfiles:/var/lib/node_exporter/textfile_collector \
sourcemation/node_exporter:latest \
--collector.textfile.directory=/var/lib/node_exporter/textfile_collector
Run with host monitoring (recommended for production):
docker run -d \
--name node_exporter \
--net="host" \
--pid="host" \
-v "/:/host:ro,rslave" \
sourcemation/node_exporter:latest \
--path.rootfs=/host
Run with specific collectors enabled/disabled:
docker run -d --name node_exporter \
-p 9100:9100 \
sourcemation/node_exporter:latest \
--collector.disable-defaults \
--collector.cpu \
--collector.meminfo \
--collector.loadavg \
--collector.filesystem
Run with filesystem monitoring and custom mount point exclusions:
docker run -d --name node_exporter \
-p 9100:9100 \
-v "/:/host:ro,rslave" \
sourcemation/node_exporter:latest \
--path.rootfs=/host \
--collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/)
Run with custom web configuration (TLS support):
docker run -d --name node_exporter \
-p 9100:9100 \
-v /path/to/web-config.yml:/etc/node_exporter/web-config.yml \
sourcemation/node_exporter:latest \
--web.config.file=/etc/node_exporter/web-config.yml
Run with additional collectors enabled:
docker run -d --name node_exporter \
-p 9100:9100 \
-v "/:/host:ro,rslave" \
sourcemation/node_exporter:latest \
--path.rootfs=/host \
--collector.systemd \
--collector.processes \
--collector.interrupts \
--log.level=info
This image uses the following environment variables:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
This image exposes the following ports:
Please note that the ports need to be either manually forwarded with the -p option or let Docker choose some for you with the -P option.
--path.rootfs=/host)Enable specific collectors:
--collector.systemd --collector.processes
Disable default collectors:
--no-collector.arp --no-collector.bcache
Enable only specific collectors:
--collector.disable-defaults --collector.cpu --collector.meminfo --collector.loadavg
Many collectors support include/exclude patterns:
# Exclude certain filesystem types
--collector.filesystem.fs-types-exclude=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$
# Exclude certain mount points
--collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/)
# Include only specific network devices
--collector.netdev.device-include=^(eth0|wlan0)$
The textfile collector allows you to expose custom metrics from files:
# Enable textfile collector
--collector.textfile.directory=/var/lib/node_exporter/textfile_collector
# Example: Create a custom metric file
echo 'my_custom_metric{label="value"} 42' > /var/lib/node_exporter/textfile_collector/custom.prom
This image runs as the nobody user (non-root) for enhanced security.
For production host monitoring, it's recommended to run the container with:
--net="host")--pid="host")-v "/:/host:ro,rslave")--path.rootfs=/host argumentversion: '3.8'
services:
node_exporter:
image: sourcemation/node_exporter:latest
container_name: node_exporter
command:
- '--path.rootfs=/host'
- '--collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/)'
- '--collector.systemd'
- '--collector.processes'
network_mode: host
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
Example Prometheus scrape configuration:
scrape_configs:
- job_name: 'node_exporter'
static_configs:
- targets: ['localhost:9100']
scrape_interval: 15s
scrape_timeout: 10s
Some of the most useful metrics exposed by Node Exporter:
node_cpu_seconds_total - CPU time spent in different modesnode_memory_MemTotal_bytes - Total memory in bytesnode_memory_MemAvailable_bytes - Available memory in bytesnode_filesystem_size_bytes - Filesystem size in bytesnode_filesystem_avail_bytes - Filesystem space available in bytesnode_load1, node_load5, node_load15 - Load averagesnode_network_receive_bytes_total - Network bytes receivednode_network_transmit_bytes_total - Network bytes transmittednode_disk_read_bytes_total - Disk bytes readnode_disk_written_bytes_total - Disk bytes writtenWe'd love for you to contribute! You can request new features, report bugs, or submit a pull request with your contribution to this image on the Sourcemation GitHub repository.
Disclaimer: The sourcemation/node_exporter image is not affiliated with the Prometheus Node Exporter project. The respective companies and organisations own the trademarks mentioned in the offering. The sourcemation/node_exporter image is a separate project and is maintained by Sourcemation.
A detailed risk analysis report of the image and its components can be found on the Sourcemation platform.
For more information, check out the Node Exporter documentation and the official Node Exporter repository.
The base license for the solution (Node Exporter) is the Apache License 2.0. The licenses for each component shipped as part of this image can be found on the image's appropriate Sourcemation entry.
Content type
Image
Digest
sha256:112c50beb…
Size
44.4 MB
Last updated
6 days ago
docker pull sourcemation/node_exporter