Skip to content

Serial sensor monitor and prometheus gateway

Notifications You must be signed in to change notification settings

rhermsen/pm-monitor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Credit

This repo is forked from the monitor_rtl433 and adapted to my needs.

PM-monitor

A wrapper to collect data from 'PM Detector' PM2.5, temperature and humidity sensors using serial over USB, and make it available as metrics in prometheus format.

Requirements

The PM-Detector connected via a local USB port.

Setup

This program is just a simple python wrapper that initializes the PM-Detector and collects its output, while running a webserver to serve out the collected data.

After installing the package, you can run it simply with python -m pm_monitor, and then visit localhost:5000. Out-of-the box, the /sensors route will show raw data from any detected sensors, but the /metrics route will be blank.

Setting up the /metrics routes requires a little more work to define which sensors you want to generate metrics from, and how they should be defined. See examples/main.py for an example of how to create MetricDescription and MetricFilter objects and provide these to pm_montor.run().

Sensors Table

About

Serial sensor monitor and prometheus gateway

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.7%
  • HTML 1.8%
  • CSS 0.5%