✨ Features
Includes a minimal NVML FFI layer (src/lib.rs) via libloading. No nvml-wrapper, no build script, no pkg-config.
All standard GPU telemetry via a single static binary:
- Temperature, utilization (GPU + memory), memory (total/used/free)
- Power usage, clock speeds (SM + memory), fan speed
- GPU identity: name, UUID, serial
- Running process counts
⚙️ Requirements
- Linux with NVIDIA GPU
- NVIDIA driver (R450+ recommended, tested on 595.58.03)
- Rust 1.75+ (for building)
🚀 Build & Run
cargo build --release ./target/release/rvidia-exporter
📟 CLI Options
| Option | Default | Description |
|---|---|---|
--addr <ADDR> |
0.0.0.0 |
Bind address |
--port <PORT> |
9835 |
Bind port |
-h, --help |
— | Show help |
-V, --version |
— | Show version |
🔌 Endpoints
| Endpoint | Description |
|---|---|
/metrics |
Prometheus text exposition format |
/health |
Returns OK |
/ |
Info page with links |
📊 Metrics (16 total)
All metrics carry a gpu label (0, 1, …).
| Metric | Labels | Description |
|---|---|---|
nvidia_gpu_count |
— | Number of GPUs |
nvidia_gpu_info |
gpu |
GPU information (value=1 for each GPU) |
nvidia_gpu_uuid |
gpu, uuid |
GPU UUID |
nvidia_gpu_serial |
gpu, serial |
GPU serial number |
nvidia_gpu_temperature_celsius |
gpu |
Temperature (Celsius) |
nvidia_gpu_utilization_percent |
gpu |
GPU utilization (%) |
nvidia_memory_utilization_percent |
gpu |
Memory utilization (%) |
nvidia_memory_total_bytes |
gpu |
Total memory (bytes) |
nvidia_memory_used_bytes |
gpu |
Used memory (bytes) |
nvidia_memory_free_bytes |
gpu |
Free memory (bytes) |
nvidia_power_draw_watts |
gpu |
Power draw (watts) |
nvidia_sm_clock_mhz |
gpu |
SM clock (MHz) |
nvidia_memory_clock_mhz |
gpu |
Memory clock (MHz) |
nvidia_fan_speed_percent |
gpu |
Fan speed (%) |
nvidia_processes_count |
gpu |
Processes using GPU |
📈 Grafana Dashboard
Import the dashboard JSON from dashboard.json.
⚡ Prometheus Config
scrape_configs: - job_name: 'nvidia-gpu' static_configs: - targets: ['localhost:9835'] scrape_interval: 30s metrics_path: '/metrics'
🛠️ Systemd Service
[Unit] Description=rvidia-exporter — NVIDIA GPU Exporter for Prometheus After=network.target [Service] Type=simple ExecStart=/opt/rvidia-exporter/rvidia-exporter Restart=always RestartSec=10 [Install] WantedBy=multi-user.target
💜 About
Built by the team at AI Router Switzerland — the Swiss AI inference API.
📄 License
MIT
