node-exporter with hostname
.github/workflows | ||
.gitattributes | ||
Dockerfile | ||
entrypoint.sh | ||
README.md |
Table of Contents
About
This is an extension of prom/node-exporter which adds the hostname as a metric.
For the hostname to be detected, you must mount the host's rootfs
into the container's /host
directory:
version: '3.8'
services:
node-exporter:
image: ztimson/node-exporter:latest
command:
- --path.rootfs=/host
volumes:
- /:/host:ro,rslave
networks:
- network
deploy:
mode: global
Built With
Setup
Production
Prerequisites
Instructions
- Run the docker image:
docker run -v "/:/host:ro,rslave" ztimson/node-exporter --path.rootfs=/host
Development
Prerequisites
Instructions
- Build the docker image:
docker build -t MY_IMAGE:TAG .
- Run docker image:
docker run -v "/:/host:ro,rslave" MY_IMAGE:TAG --path.rootfs=/host