Skip to content

utkuozdemir/nvidia_gpu_exporter

Repository files navigation

nvidia_gpu_exporter

build codecov Go Report Card Latest GitHub release GitHub license GitHub all releases Docker Pulls

Nvidia GPU exporter for prometheus, using nvidia-smi binary to gather metrics.


Warning

Maintenance Status: I get that it can be frustrating not to hear back about the stuff you've brought up or the changes you've suggested. But honestly, for over a year now, I've hardly had any time to keep up with my personal open-source projects, including this one. I am still committed to keep this tool working and slowly move it forward, but please bear with me if I can't tackle your fixes or check out your code for a while. Thanks for your understanding.


Introduction

There are many Nvidia GPU exporters out there however they have problems such as not being maintained, not providing pre-built binaries, having a dependency to Linux and/or Docker, targeting enterprise setups (DCGM) and so on.

This is a simple exporter that uses nvidia-smi(.exe) binary to collect, parse and export metrics. This makes it possible to run it on Windows and get GPU metrics while gaming - no Docker or Linux required.

This project is based on a0s/nvidia-smi-exporter. However, this one is written in Go to produce a single, static binary.

If you are a gamer who's into monitoring, you are in for a treat.

Highlights

  • Will work on any system that has nvidia-smi(.exe)? binary - Windows, Linux, MacOS... No C bindings required
  • Doesn't even need to run the monitored machine: can be configured to execute nvidia-smi command remotely
  • No need for a Docker or Kubernetes environment
  • Auto-discovery of the metric fields nvidia-smi can expose (future-compatible)
  • Optional per-process GPU metrics: see which process uses how much GPU memory
  • Comes with its own Grafana dashboard

Visualization

You can use the official Grafana dashboard to see your GPU metrics in a nicely visualized way.

Here's how it looks like: Grafana dashboard

Installation

See INSTALL.md for details.

Verifying releases

Release artifacts are signed so you can check they came from this project's release pipeline:

  • The checksums.txt file attached to each release is signed with GPG (checksums.txt.asc), which covers every binary, archive and package.
  • The container images and the Helm chart are signed keyless with cosign, tied to the release workflow's identity.

See INSTALL.md for the exact verification commands, and the chart README for the chart.

Configuration

See CONFIGURE.md for details.

Metrics

See METRICS.md for details.

Contributing

See CONTRIBUTING.md for details.

Help wanted: contribute a GPU capture

The exporter parses nvidia-smi output, which differs across GPU models, driver versions and operating systems. If you have hardware that isn't covered yet (datacenter cards, MIG, multi-GPU, Windows/WSL2, brand-new drivers...), you can help a lot by capturing your nvidia-smi output with one command:

./internal/captures/collect.sh          # add --load for an under-load sample too

It needs only nvidia-smi, bash, and the standard core utilities (awk, sed, ...), runs read-only, and masks identifiers (GPU UUID, serial, hostname) by default. It writes one .txt file: commit it and open a PR, or attach it to an issue. See internal/captures/README.md.

Star History

Star History Chart

About

Nvidia GPU exporter for prometheus using nvidia-smi binary

Topics

Resources

License

Code of conduct

Contributing

Stars

1.5k stars

Watchers

7 watching

Forks

Packages

 
 
 

Contributors

Languages