node-exporter/README.md
Zakary Timson 5dc4169f15
All checks were successful
Build / Build & Push Dockerfile (push) Successful in 14s
Build / Tag Version (push) Successful in 3s
Update README.md
2023-12-16 00:59:12 +00:00

3.2 KiB


Logo

node-exporter

node-exporter with hostname

Version Pull Requests Issues



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

See on DockerHub

Built With

Docker

Setup

Production

Prerequisites

Instructions

  1. Run the docker image: docker run -v "/:/host:ro,rslave" ztimson/node-exporter --path.rootfs=/host

Development

Prerequisites

Instructions

  1. Build the docker image: docker build -t MY_IMAGE:TAG .
  2. Run docker image: docker run -v "/:/host:ro,rslave" MY_IMAGE:TAG --path.rootfs=/host

License

Copyright © 2023 Zakary Timson | Available under the Apache 2.0 License

See the license for more information.