Skip to content

nerevu/sense-hat-b-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Waveshare Sense HAT (B) Prometheus Exporter

A simple Prometheus exporter for exporting values from the Waveshare Sense HAT (B).

Requirements

Installation

git clone https://github.com/epleterte/sensehat-b-exporter.git
cd sensehat-exporter
pip3 install -r requirements.txt
sudo cp exporter.py /usr/local/bin/sensehat-b-exporter
# start sensehat-b-exporter!
sensehat-b-exporter

Usage

usage: sensehat-b-exporter.py [-h] [--port [PORT]] [--bind [BIND]]

optional arguments:
  -h, --help     show this help message and exit
  --port [PORT]  The TCP port to listen on (default: 9111)
  --bind [BIND]  The interface/IP to bind to (default: 0.0.0.0)

Configuration

Currently there are no other configuration than options IP/port and no configuration file.

Prometheus Configuration

In /etc/prometheus/prometheus.yml, Add a static scrape target under scrape_configs:

scrape_configs:
  - job_name: 'sensehat-b'
    static_configs:
    - targets: ['<ip>:9111']

TODO

  • Upload example Grafana dashboard
  • Possibly make additional sensors configurable.

Demo

Here's a screenshot of the data being put to use in a Grafana dashboard:

Grafana Sense HAT (B) dashboard screenshot

License

This software is licensed under the ISC license.

About

A simple Prometheus exporter for exporting values from the Waveshare Sense HAT (B)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published