node-exporter with hostname
Go to file
Zakary Timson 0fc2302ebd
All checks were successful
Build / Build & Push Dockerfile (push) Successful in 20s
Build / Tag Version (push) Successful in 5s
Add LICENSE
2023-12-16 00:58:11 +00:00
.github/workflows Updated readme & ci/cd 2023-12-13 23:37:54 -05:00
.gitattributes added git attributes 2022-06-02 15:24:57 -04:00
Dockerfile Update Dockerfile 2022-08-06 18:32:46 +00:00
entrypoint.sh Update 2022-06-02 19:15:59 +00:00
LICENSE Add LICENSE 2023-12-16 00:58:11 +00:00
README.md Updated readme & ci/cd 2023-12-13 23:37:54 -05:00


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