Skip to main content

Raspberry Pi 5 Wan Bot Exporter

Raspberry Pi Prometheus exporter. Works in Docker or as a standalone script to export data to Prometheus. It uses python's internal webserver. Supports Raspberry Pi 5 and Raspbian-based images. Currently, exports:

  • Ping to 8.8.8.8 and packet loss computed from 3 packages.
  • Upload, Download and latency to Bredbandskollen using bbk-cli

Credit to ChatGPT
Alt Text

Requirements

  • Python 3.x
  • (optional) Docker

Usage

Docker

It is recommended to build the image locally to ensure that it is compatible with you platform.

docker build -t rpi5_wanBot_exporter -t registry.gitlab.com/niklasme/wanbot:latest.

To bring up the container without mounted volumes for reading fan speed ant temperature sensors.

docker run -d -p 8878:8878 --name rpi5_wanBot_exporter rpi5_wanBot_exporter

Docker compose

You can also use Docker compose to simplify the process by placing the following content in the docker-compose.yaml file and also add the required links to the files containing the fan speed and cpu temperature. If the container fail to start, ensure that it is compatible with your platform; i.e. amd64 aarch64 etc.

services:
  rpi5_wanBfot_exporter:
    image: registry.gitlab.com/niklasme/wanbot:latest
    container_name: rpi5_wanBot_exporter
    ports:
     - 8878:8878
    volumes:
      - /sys/devices/platform/cooling_fan/hwmon/:/sensors/hwmon:ro
      - /sys/class/thermal/thermal_zone0/temp:/sensors/temp:ro

Bring up the container after building it with docker compose up. The additional -d is to run in detached mode as a service.

docker build -t rpi5_wanBot_exporter .
docker compose up -d

Standalone

  • clone this repository or download the script to your Raspberry Pi 5
  • run the exporter python3 rpi5_wanBot_exporter.py --webserver --port 8878

Integration with Prometheus:

To integrate with Prometheus, add the following job to your Prometheus configuration file (prometheus.yml):

scrape_configs:
  - job_name: 'rpi5_wanBot_exporter'
    static_configs:
      - targets: ['<Raspberry_Pi_IP>:8878']

License

This script is provided under the MIT License. See the LICENSE file for more details.

Metadata

Release files for rpi5-wanbot-exporter 0.4

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

Source distribution (sdist)

Source distribution for rpi5-wanbot-exporter 0.4
File Size Uploaded Provenance Actions
rpi5_wanbot_exporter-0.4.tar.gz 436.8 kB Without provenance Details for rpi5_wanbot_exporter-0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rpi5-wanbot-exporter 0.4
File Interpreter ABI Platform Actions
rpi5_wanbot_exporter-0.4-py3-none-any.whl Python 3 none any Details for rpi5_wanbot_exporter-0.4-py3-none-any.whl

Total release size: 874.8 kB

Release files / rpi5_wanbot_exporter-0.4.tar.gz

Download URL rpi5_wanbot_exporter-0.4.tar.gz
Size 436.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c0490415981d746d3fb79bd28ee00bf92a873fccf4b4ea6485c26aee5a98aee7
BLAKE2b-256 checksum
How to use checksums
a83da9528e5ea2c4466806cbcd216ef9beeb546f4a3584c483f4988db39d18f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.12

Release files / rpi5_wanbot_exporter-0.4-py3-none-any.whl

Download URL rpi5_wanbot_exporter-0.4-py3-none-any.whl
Size 438.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf971267d83efbf2cbeda87a3da296136b060a7a77edc36b586342275288f914
BLAKE2b-256 checksum
How to use checksums
43ed4bad424818769eb880b35ea881115aa671bb9044d2dcca09671e1881e74d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.12

Security for rpi5-wanbot-exporter 0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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