Skip to main content

Prometheus Node Exporter for Nvidia Jetson Devices running Jetson Stats (now including AGX Orin with JetPack 6.0)

Project description

Nvidia Jetson Prometheus Node Exporter (incl. GPU) - incl. JetPack 6.0

This project contains a node exporter variation building on jetson-stats (jtop) rather than tegrastats directly. We export the following metrics:

  • CPU
  • Memory
  • GPU
  • VRAM
  • Swap
  • Component Temperature
  • Disk Utilization
  • System Uptime

We do not export:

  • Power consumption

Installation

You can either clone this repo or use pip for installation. Wheels or binaries are provided here: Jetson Stats Node Exporter Releases

Easy Installation via PyPi

Make sure your local installation of jetson-stats is 4.2.9. Otherwise, you will run into dependency issues.

pip install jetson-stats-node-exporter==0.1.3

Install from git

Installation with pip (no venv or conda due to jetson-stats dependency!):

> export JSN_RELEASE="0.1.3"
> sudo -H pip3 install -U https://github.com/laminair/jetson_stats_node_exporter/releases/download/$JSN_RELEASE/jetson_stats_node_exporter-$JSN_RELEASE-py3-none-any.whl

Install from source

Manual installation (may require sudo privileges due to jetson-stats dependency):

> git clone https://github.com/laminair/jetson_stats_node_exporter.git
> cd jetson_stats_node_exporter
> uv sync

Running the exporter

After installation the project is available as python module. Run it as follows:

python3 -m jetson_stats_node_exporter

This will spawn a prometheus node exporter service on port 9100 and you'll be able to scrape all statistics. Note: The command above can also be run as a systemd service in the background.

Creating a background service

The node exporter can be wrapped in a systemd service. Place the following file in path /etc/systemd/system/jetson-stats-node-exporter.service

[Unit]
Description=Jetson Stats GPU Node Exporter
After=multi-user.target
Requires=jtop.service

[Service]
Type=simple
Restart=on-failure
RestartSec=10
User=root
Group=root
ExecStart=/usr/bin/python3 -m jetson_stats_node_exporter

[Install]
WantedBy=multi-user.target

Then run sudo systemctl start jetson-stats-node-exporter. To check if the service is alive sudo systemctl status jetson-stats-node-exporter

Creating a docker image

The node exporter can be wrapped in a docker image and can be run via docker. If you use docker compose you can build the image directly via docker compose. Place the Dockerfile in the same directory as your docker-compose.yaml, or use the context option in your docker-compose.yaml to specify the folder containing the Dockerfile.

  jetson_stats_node_exporter:
    build:
      context: <PATH_TO_JETSON_STATS_NODE_EXPORTER_PACKAGE>
      dockerfile: Dockerfile
    container_name: jetson_stats_node_exporter
    restart: always
    ports:
      - "9100:9100"  # Map internal port 9100 to a different external port 9100
    volumes:
      - /run/jtop.sock:/run/jtop.sock
    healthcheck:
      test: ["CMD", "curl", "--fail", "http://localhost:9100/metrics"]
      interval: 30s
      timeout: 10s
      retries: 10
      start_period: 60s

Important Note: When using docker, you may not be able to export disk statistics. Please see this GitHub issue.

Credits

This project is based on https://github.com/lipovsek/jetson_prometheus_exporter, which uses tegrastats.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jetson_stats_node_exporter-0.1.3.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jetson_stats_node_exporter-0.1.3-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file jetson_stats_node_exporter-0.1.3.tar.gz.

File metadata

File hashes

Hashes for jetson_stats_node_exporter-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d4907e2ec1019a22f7bdb6c48d0deb93344175133278b1803d787ba28d8e8228
MD5 f22132f8d47311d6d027adf01d93523c
BLAKE2b-256 16759c889c2ee1114ec5198dc77b82e850f22f804e43e35a5258e1f921a65a01

See more details on using hashes here.

File details

Details for the file jetson_stats_node_exporter-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for jetson_stats_node_exporter-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 986db868c7f1099790f26547cc55d5d2314b7bc9865af79dd7942b7dbd07533c
MD5 2d723d077f7a3657cfa6d4863c50dcad
BLAKE2b-256 904fe5ce2fcb568d5e0d4ba3fdd06021cb89b31b6a8a973e47b3de027e5e1278

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page