{"id":16162593,"url":"https://github.com/jmb12686/node-exporter","last_synced_at":"2025-03-18T22:31:10.021Z","repository":{"id":52734254,"uuid":"216095342","full_name":"jmb12686/node-exporter","owner":"jmb12686","description":"Containerized, multiarch version of node-exporter, used for Prometheus monitoring.","archived":false,"fork":false,"pushed_at":"2021-04-20T18:54:37.000Z","size":19,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T12:33:47.933Z","etag":null,"topics":["docker","docker-swarm","monitoring","multi-arch-images","multiarch","prometheus"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmb12686.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-18T19:39:27.000Z","updated_at":"2023-01-31T22:43:00.000Z","dependencies_parsed_at":"2022-08-22T00:10:05.993Z","dependency_job_id":null,"html_url":"https://github.com/jmb12686/node-exporter","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmb12686%2Fnode-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmb12686%2Fnode-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmb12686%2Fnode-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmb12686%2Fnode-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmb12686","download_url":"https://codeload.github.com/jmb12686/node-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243950927,"owners_count":20373664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-swarm","monitoring","multi-arch-images","multiarch","prometheus"],"created_at":"2024-10-10T02:31:20.920Z","updated_at":"2025-03-18T22:31:09.773Z","avatar_url":"https://github.com/jmb12686.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-exporter\r\n\u003cp align=\"center\"\u003e\r\n  \u003ca href=\"https://hub.docker.com/r/jmb12686/node-exporter/tags?page=1\u0026ordering=last_updated\"\u003e\u003cimg src=\"https://img.shields.io/github/v/tag/jmb12686/node-exporter?label=version\u0026style=flat-square\" alt=\"Latest Version\"\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://github.com/jmb12686/node-exporter/actions\"\u003e\u003cimg src=\"https://github.com/jmb12686/node-exporter/workflows/build/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://hub.docker.com/r/jmb12686/node-exporter/\"\u003e\u003cimg src=\"https://img.shields.io/docker/stars/jmb12686/node-exporter.svg?style=flat-square\" alt=\"Docker Stars\"\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://hub.docker.com/r/jmb12686/node-exporter/\"\u003e\u003cimg src=\"https://img.shields.io/docker/pulls/jmb12686/node-exporter.svg?style=flat-square\" alt=\"Docker Pulls\"\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\nContainerized, multiarch version of node-exporter, used for [Prometheus](https://prometheus.io/) monitoring.  Multi-stage build is used to build from official [node-exporter source code](https://github.com/prometheus/node_exporter).  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\r\n\r\n## Automated Build and Deploy\r\nThis repository utilizes GitHub Actions to automatically build and deploy multiarch images to DockerHub when a new tag is pushed.\r\n\r\n## Build and Deploy multiarch image locally\r\n\r\nSetup local environment to support Docker experimental feature for building multi architecture images, [buildx](https://docs.docker.com/buildx/working-with-buildx/).  Follow instructions [here](https://engineering.docker.com/2019/04/multi-arch-images/)\r\n\r\nClone repo:\r\n```bash\r\n$ git clone https://github.com/jmb12686/node-exporter\r\n$ cd node-exporter \r\n```\r\n\r\nBuild multiarch image:\r\n```bash\r\n$ docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v6 -t jmb12686/node-exporter:latest --push .\r\n```\r\n\r\n## Usage\r\n\r\nUse in docker-compose swarm stack similar to base image for `prom/node-exporter`, but added:\r\n* `NODE_ID` as environment variable\r\n* mount `/etc/hostname` of underlying host to `/etc/nodename` in the container.  \r\n* Entrypoint script within container will use `/etc/nodename` and `NODE_ID` to create custom data attributes and put config in `/etc/node-exporter`.\r\n* `node-name` and `node-id` attributes are exposed in node-exporter\r\n\r\n\r\n```yaml\r\nservices:\r\n  .....\r\n  node-exporter:\r\n    image: jmb12686/node-exporter:latest \r\n    networks:\r\n      - net\r\n    environment:\r\n      - NODE_ID={{.Node.ID}}\r\n    ports:\r\n      - 9100:9100\r\n    volumes:\r\n      - /proc:/host/proc:ro\r\n      - /sys:/host/sys:ro\r\n      - /:/rootfs:ro\r\n      - /etc/hostname:/etc/nodename:ro\r\n    command:\r\n      - '--path.sysfs=/host/sys'\r\n      - '--path.procfs=/host/proc'\r\n      - '--path.rootfs=/rootfs'\r\n      - '--collector.textfile.directory=/etc/node-exporter/'\r\n      - '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)'\r\n      - '--no-collector.ipvs'\r\n    deploy:\r\n      mode: global\r\n      resources:\r\n        limits:\r\n          memory: 32M\r\n```\r\n\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmb12686%2Fnode-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmb12686%2Fnode-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmb12686%2Fnode-exporter/lists"}