{"id":20318980,"url":"https://github.com/tedder/miner_exporter","last_synced_at":"2025-04-11T18:12:34.879Z","repository":{"id":45874878,"uuid":"354862084","full_name":"tedder/miner_exporter","owner":"tedder","description":"helium miner prometheus client exporter","archived":false,"fork":false,"pushed_at":"2021-11-30T16:45:45.000Z","size":178,"stargazers_count":19,"open_issues_count":10,"forks_count":18,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-11T18:12:30.860Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tedder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-05T14:29:03.000Z","updated_at":"2023-11-13T17:39:09.000Z","dependencies_parsed_at":"2022-09-14T12:31:12.677Z","dependency_job_id":null,"html_url":"https://github.com/tedder/miner_exporter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedder%2Fminer_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedder%2Fminer_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedder%2Fminer_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedder%2Fminer_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tedder","download_url":"https://codeload.github.com/tedder/miner_exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248456372,"owners_count":21106604,"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":[],"created_at":"2024-11-14T18:42:39.322Z","updated_at":"2025-04-11T18:12:34.853Z","avatar_url":"https://github.com/tedder.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# miner\\_exporter\nPrometheus exporter for the [Helium miner (validator)](https://github.com/helium/miner). Using prometheus\\_client, this code exposes metrics from the helium miner to a prometheus compatible server. \n\nThis is only the exporter, which still requires a **prometheus server** for data and **grafana** for the dashboard. Prometheus and Grafana servers can run on an external machine, the same machine as the miner, or possibly using a cloud service. The [helium\\_miner\\_grafana\\_dashboard](https://github.com/tedder/helium_miner_grafana_dashboard) can be imported to Grafana.\n\nNote [port 9825 is the 'reserved' port for this specific exporter](https://github.com/prometheus/prometheus/wiki/Default-port-allocations). Feel free to use whatever you like, of course, but you won't be able to [dial 9VAL on your phone](https://en.wikipedia.org/wiki/E.161).\n\n\n## Running via Docker\nUsing the docker file, you can run this with Docker or docker-compose! Both of these expose Prometheus on 9825, feel free to choose your own port. The images are hosted on both [GHCR](https://github.com/users/tedder/packages/container/package/miner_exporter) and [Dockerhub](https://hub.docker.com/r/tedder42/miner_exporter).\n\n### Docker client\n```\ndocker run -p 9825:9825 --name miner_exporter -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/tedder/miner_exporter:latest\n```\n\n### Docker-Compose\nUsing your existing docker-compose file, add the section for the exporter (below). When you're done, run `docker-compose up -d` as usual. That's it!\n```\nversion: \"3\"\nservices:\n  validator:\n    image: quay.io/team-helium/validator:latest-val-amd64\n    container_name: validator\n...\n  miner_exporter:\n    image: ghcr.io/tedder/miner_exporter:latest\n    container_name: miner_exporter\n    volumes:\n    - /var/run/docker.sock:/var/run/docker.sock\n    ports:\n    - \"9825:9825\"\n```\n\n## Running locally\nOn the miner machine:\n\ninstall python3\n```\npip install prometheus_client psutil docker\n```\nDetails on the libraries:\n* [client\\_python](https://github.com/prometheus/client_python)\n* [psutil](https://github.com/giampaolo/psutil)\n* [docker](https://pypi.org/project/docker/)\n\n\n## Configuration\n\nThe following have valid defaults, but you can change them:\n```\nUPDATE_PERIOD  # seconds between scrapes, int\nVALIDATOR_CONTAINER_NAME # eg 'validator', string\nAPI_BASE_URL # URL for api access, string. For testnet, set to \"https://testnet-api.helium.wtf/v1\"\nENABLE_RPC # opt in to using the RPC API with a truthy value (defaults to falsey value until `exec` calls are fully replaced).\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftedder%2Fminer_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftedder%2Fminer_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftedder%2Fminer_exporter/lists"}