{"id":13582433,"url":"https://github.com/mindprince/nvidia_gpu_prometheus_exporter","last_synced_at":"2026-01-12T00:59:22.714Z","repository":{"id":39892695,"uuid":"134140626","full_name":"mindprince/nvidia_gpu_prometheus_exporter","owner":"mindprince","description":"NVIDIA GPU Prometheus Exporter","archived":false,"fork":false,"pushed_at":"2021-07-15T07:41:19.000Z","size":292,"stargazers_count":223,"open_issues_count":11,"forks_count":78,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-05T22:41:16.071Z","etag":null,"topics":["gpu","monitoring","nvidia-smi","nvml","prometheus","prometheus-exporter"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mindprince.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":"2018-05-20T10:24:27.000Z","updated_at":"2024-10-02T12:33:01.000Z","dependencies_parsed_at":"2022-08-30T19:02:29.643Z","dependency_job_id":null,"html_url":"https://github.com/mindprince/nvidia_gpu_prometheus_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/mindprince%2Fnvidia_gpu_prometheus_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindprince%2Fnvidia_gpu_prometheus_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindprince%2Fnvidia_gpu_prometheus_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindprince%2Fnvidia_gpu_prometheus_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mindprince","download_url":"https://codeload.github.com/mindprince/nvidia_gpu_prometheus_exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247495728,"owners_count":20948101,"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":["gpu","monitoring","nvidia-smi","nvml","prometheus","prometheus-exporter"],"created_at":"2024-08-01T15:02:42.362Z","updated_at":"2025-04-06T14:30:54.516Z","avatar_url":"https://github.com/mindprince.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"NVIDIA GPU Prometheus Exporter\n------------------------------\n\nThis is a [Prometheus Exporter](https://prometheus.io/docs/instrumenting/exporters/) for\nexporting NVIDIA GPU metrics. It uses the [Go bindings](https://github.com/mindprince/gonvml)\nfor [NVIDIA Management Library](https://developer.nvidia.com/nvidia-management-library-nvml)\n(NVML) which is a C-based API that can be used for monitoring NVIDIA GPU devices.\nUnlike some other similar exporters, it does not call the\n[`nvidia-smi`](https://developer.nvidia.com/nvidia-system-management-interface) binary.\n\n## Building\n\nThe repository includes `nvml.h`, so there are no special requirements from the\nbuild environment. `go get` should be able to build the exporter binary.\n\n```\ngo get github.com/mindprince/nvidia_gpu_prometheus_exporter\n```\n\n## Running\n\nThe exporter requires the following:\n- access to NVML library (`libnvidia-ml.so.1`).\n- access to the GPU devices.\n\nTo make sure that the exporter can access the NVML libraries, either add them\nto the search path for shared libraries. Or set `LD_LIBRARY_PATH` to point to\ntheir location.\n\nBy default the metrics are exposed on port `9445`. This can be updated using\nthe `-web.listen-address` flag.\n\n## Running inside a container\n\nThere's a docker image available on Docker Hub at\n[mindprince/nvidia_gpu_prometheus_exporter](https://hub.docker.com/r/mindprince/nvidia_gpu_prometheus_exporter/)\n\nIf you are running the exporter inside a container, you will need to do the\nfollowing to give the container access to NVML library:\n```\n-e LD_LIBRARY_PATH=\u003cpath-where-nvml-is-present\u003e\n--volume \u003cabove-path\u003e:\u003cabove-path\u003e\n```\n\nAnd you will need to do one of the following to give it access to the GPU\ndevices:\n- Run with `--privileged`\n- If you are on docker v17.04.0-ce or above, run with `--device-cgroup-rule 'c 195:* mrw'`\n- Run with `--device /dev/nvidiactl:/dev/nvidiactl /dev/nvidia0:/dev/nvidia0 /dev/nvidia1:/dev/nvidia1 \u003cand-so-on-for-all-nvidia-devices\u003e`\n\nIf you don't want to do the above, you can run it using nvidia-docker.\n\n## Running using [nvidia-docker](https://github.com/NVIDIA/nvidia-docker)\n\n```\nnvidia-docker run -p 9445:9445 -ti mindprince/nvidia_gpu_prometheus_exporter:0.1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindprince%2Fnvidia_gpu_prometheus_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmindprince%2Fnvidia_gpu_prometheus_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindprince%2Fnvidia_gpu_prometheus_exporter/lists"}