Sign inSign up

thundermagic/rpi_cpu_stats

By thundermagic

•Updated over 6 years ago

Prometheus exporter to expose raspberry pi cpu stats like temp and frequencies.

Image
0

50K+

thundermagic/rpi_cpu_stats repository overview

⁠Prometheus exporter to export raspberry pi cpu stats.

Exposes CPU temp and CPU max, min and current frequency

It read the stats from files in /sys directory. So this should work without any dependency on vcgencmd command and on distros which do not have vcgencmd installed by default

Docker images are available at: https://hub.docker.com/r/thundermagic/rpi_cpu_stats⁠

⁠Docker examples

Docker run
docker container run --name rpi_cpu_stats -v /sys:/sys:ro -p 9669:9669 -d thundermagic/rpi_cpu_stats:latest

docker compose

version: "2"
services:
  rpi_cpu_stats:
    image: thundermagic/rpi_cpu_stats:latest
    restart: always
    container_name: rpi_cpu_stats
    ports:
      - "9669:9669"
    environment: # Add the PUID and PGID of the user you want to run the container as
      - PUID=1001
      - PGID=1001
    volumes:
      - /sys:/sys

After running container, add a scrape job to prometheus.yml. Example below

scrape_configs:
    - job_name: 'rpi_cpu_stats'
      static_configs:
      - targets: ['192.168.4.4:9669'] # IP address of the RPi

Tag summary

Content type

Image

Digest

Size

26.4 MB

Last updated

over 6 years ago

docker pull thundermagic/rpi_cpu_stats