Skip to main content

nvitop-exporter

Prometheus exporter built on top of nvitop.

Quickstart

Start the exporter with the following command:

uvx nvitop-exporter --bind-address 0.0.0.0 --port 5050
# or
pipx run 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.

scrape_configs:
  - job_name: 'nvitop-exporter'
    static_configs:
      - targets: ['localhost:5050']

TLS / mTLS

The exporter can serve metrics over HTTPS, optionally requiring client certificate authentication (mTLS). TLS support is provided by prometheus_client (>= 0.19.0) and configured entirely through CLI flags — no config file is involved.

Plain HTTPS

Provide a server certificate and private key:

nvitop-exporter --bind-address 0.0.0.0 --port 5050 \
    --certfile /path/to/server.crt \
    --keyfile /path/to/server.key

The metrics endpoint is then served at https://localhost:5050/metrics. Update the Prometheus scrape config to use the https scheme, and point it at the CA that signed your server certificate:

scrape_configs:
  - job_name: 'nvitop-exporter'
    scheme: https
    static_configs:
      - targets: ['localhost:5050']
    tls_config:
      ca_file: /path/to/server-ca.crt

Mutual TLS (mTLS)

To require scrapers to present a valid client certificate, pass a CA bundle (--client-cafile) or CA directory (--client-capath) and --client-auth-required:

nvitop-exporter --bind-address 0.0.0.0 --port 5050 \
    --certfile /path/to/server.crt \
    --keyfile /path/to/server.key \
    --client-cafile /path/to/clients-ca.crt \
    --client-auth-required

--client-cafile / --client-capath and --client-auth-required must be specified together. Passing a CA without --client-auth-required is rejected by the CLI to avoid the silent "trust but don't verify" configuration that the underlying prometheus_client API would otherwise allow.

Configure Prometheus to present its client certificate when scraping:

scrape_configs:
  - job_name: 'nvitop-exporter'
    scheme: https
    static_configs:
      - targets: ['localhost:5050']
    tls_config:
      ca_file: /path/to/server-ca.crt
      cert_file: /path/to/prometheus-client.crt
      key_file: /path/to/prometheus-client.key

Authentication beyond mTLS

The exporter does not implement HTTP basic auth, OAuth, or IP allowlisting. Following the standard Prometheus exporter pattern, run the exporter behind a reverse proxy (NGINX, Traefik, Caddy, ...) if any of those are required.

Grafana Dashboard

A Grafana dashboard is provided to visualize the metrics collected by the exporter. The source of the dashboard is dashboard.json. The Grafana dashboard can also be imported as by ID 22589.

If you are using docker-compose, you can start a dashboard at http://localhost:3000 with the following command:

cd nvitop-exporter/grafana
docker compose up --build --detach

Grafana Dashboard
The Grafana dashboard for the exporter.

Metadata

Release files for nvitop-exporter 1.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nvitop-exporter 1.7.1
File Size Uploaded
nvitop_exporter-1.7.1.tar.gz 16.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nvitop-exporter 1.7.1
File Interpreter ABI Platform
nvitop_exporter-1.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 35.2 kB

Release files / nvitop_exporter-1.7.1.tar.gz

Download URL nvitop_exporter-1.7.1.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f9a75715f29043c543f5ee4a16e37b13fdbb3eba573d50f8126c5dc271626f5a
BLAKE2b-256 checksum
How to use checksums
613a71e5740ddb4ee91486a6c45e1c0dbc2f34a213a468611cce7c5e23500b0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / nvitop_exporter-1.7.1-py3-none-any.whl

Download URL nvitop_exporter-1.7.1-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea6dc61035a4e61d26b0f48efb9c4e3f19ecf3b6404d65460dabb91dd1c98895
BLAKE2b-256 checksum
How to use checksums
d21f0b50750d9675565498481181b03327903c05a13adbedc41addd96221c407
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

1.7.1 This release

2 release files

1.7.0

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page