Code Monkey home page Code Monkey logo

node-exporter's Introduction

node-exporter

Latest Version Build Status Docker Stars Docker Pulls

Containerized, multiarch version of node-exporter, used for Prometheus monitoring. Multi-stage build is used to build from official node-exporter source code. Designed to be usable within x86-64, arm64, armv6, and armv7 based Docker Swarm clusters. Added support for correct reporting of the underlying node hostname

Automated Build and Deploy

This repository utilizes GitHub Actions to automatically build and deploy multiarch images to DockerHub when a new tag is pushed.

Build and Deploy multiarch image locally

Setup local environment to support Docker experimental feature for building multi architecture images, buildx. Follow instructions here

Clone repo:

$ git clone https://github.com/jmb12686/node-exporter
$ cd node-exporter 

Build multiarch image:

$ docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v6 -t jmb12686/node-exporter:latest --push .

Usage

Use in docker-compose swarm stack similar to base image for prom/node-exporter, but added:

  • NODE_ID as environment variable
  • mount /etc/hostname of underlying host to /etc/nodename in the container.
  • Entrypoint script within container will use /etc/nodename and NODE_ID to create custom data attributes and put config in /etc/node-exporter.
  • node-name and node-id attributes are exposed in node-exporter
services:
  .....
  node-exporter:
    image: jmb12686/node-exporter:latest 
    networks:
      - net
    environment:
      - NODE_ID={{.Node.ID}}
    ports:
      - 9100:9100
    volumes:
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /:/rootfs:ro
      - /etc/hostname:/etc/nodename:ro
    command:
      - '--path.sysfs=/host/sys'
      - '--path.procfs=/host/proc'
      - '--path.rootfs=/rootfs'
      - '--collector.textfile.directory=/etc/node-exporter/'
      - '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)'
      - '--no-collector.ipvs'
    deploy:
      mode: global
      resources:
        limits:
          memory: 32M

node-exporter's People

Contributors

jmb12686 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.