Skip to content

Commit

Permalink
feat(exporter): add dashboard example (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
XuehaiPan authored Dec 29, 2024
1 parent 3461ad9 commit 497bec7
Show file tree
Hide file tree
Showing 5 changed files with 2,675 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ insert_final_newline = true
indent_size = 4
src_paths=nvitop

[*.{yaml,yml}]
[*.{yaml,yml,json,xml}]
indent_size = 2

[*.md]
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ An interactive NVIDIA-GPU process viewer and beyond, the one-stop solution for G
(TERM: GNOME Terminal / OS: Ubuntu 16.04 LTS (over SSH) / Locale: <code>en_US.UTF-8</code>)
</p>

<p align="center">
<a href="./nvitop-exporter">
<img width="100%" src="https://github.com/user-attachments/assets/c1769a8b-2d06-47c4-8f76-c91dace132e9" alt="Filter">
</a>
<br/>
A Grafana dashboard built on top of <code>nvitop-exporter</code>.
</p>


### Table of Contents <!-- omit in toc --> <!-- markdownlint-disable heading-increment -->

- [Features](#features)
Expand Down
31 changes: 28 additions & 3 deletions nvitop-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,35 @@

Prometheus exporter built on top of `nvitop`.

## Installation
## Quickstart

Install from PyPI:
Start the exporter with the following command:

```bash
pip3 install --upgrade nvitop-exporter
pipx run nvitop-exporter --bind-address 0.0.0.0 --port 5050
# or
uvx nvitop-exporter --bind-address 0.0.0.0 --port 5050
```

Then you can access the metrics at `http://localhost:5050/metrics`.

You will need to configure Prometheus to scrape the metrics from the exporter.

```yaml
scrape_configs:
- job_name: 'nvitop-exporter'
static_configs:
- targets: ['localhost:5050']
```
## Grafana Dashboard
A Grafana dashboard is provided to visualize the metrics collected by the exporter.
The source of the dashboard is [`dashboard.json`](./dashboard.json).
The Grafana dashboard can also be imported as by ID [22589](https://grafana.com/grafana/dashboards/22589-nvitop-dashboard).

<p align="center">
<img width="100%" src="https://github.com/user-attachments/assets/c1769a8b-2d06-47c4-8f76-c91dace132e9" alt="Filter">
<br/>
The Grafana dashboard for the exporter.
</p>
Loading

0 comments on commit 497bec7

Please sign in to comment.