A custom version of prom/node-exporter
960
A custom version of prom/node-exporter.
This custom version allows mounting a hostfile into the container using a container volume with the path /etc/hostname:/etc/nodename
This custom version also allows publishing the Node.ID into the container using the environment variable NODE_ID
An example docker-compose file:
version: '3.3'
networks:
net:
services:
node-exporter:
image: jwenz723/node-exporter:v0.16.0
networks:
- net
ports:
- "9100:9100"
environment:
- NODE_ID={{.Node.ID}}
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
- /etc/hostname:/etc/nodename
command:
- '--path.sysfs=/host/sys'
- '--path.procfs=/host/proc'
- '--collector.textfile.directory=/etc/node-exporter/'
- '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)'
# no collectors are explicitely enabled here, because the defaults are just fine,
# see https://github.com/prometheus/node_exporter
# disable ipvs collector because it barfs the node-exporter logs full with errors on my centos 7 vm's
- '--no-collector.ipvs'
deploy:
mode: global
Content type
Image
Digest
Size
7.9 MB
Last updated
about 8 years ago
docker pull jwenz723/node-exporter