Skip to content

Monitor a Raspberry Pi / HC-SR04 Ultrasonic Rangefinder Distance with Prometheus

License

Notifications You must be signed in to change notification settings

geekdave/prometheus_hcsr04_exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prometheus_hcsr04_exporter

Monitor a Raspberry Pi / HC-SR04 Ultrasonic Rangefinder Distance with Prometheus

Requirements

  • A Raspberry Pi (this won't work on Mac/PC/etc)
  • an HC-SR04 sensor.
  • A breadboard
  • Follow this guide to wire the Pi's GPIO pins to the sensor using the same pins they specify in the guide.

Install

From the raspberry pi CLI:

git clone git@github.com:geekdave/prometheus_hcsr04_exporter.git
cd prometheus_hcsr04_exporter.git
npm install

Running

sudo node exporter.js

Note: sudo is required to access the GPIO pins.

Test it using:

curl http://localhost:9207/metrics

License

Apache 2.0

Version history

  • v0.0.1 (June 2, 2019) : Initial release

About

Monitor a Raspberry Pi / HC-SR04 Ultrasonic Rangefinder Distance with Prometheus

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published