Skip to main content

Push gateway for processing metrics with automation and states.

Project description

Laporte

  • a gateway for processing metrics with automation and states
  • acceptor for sensors, batch jobs or messages
  • with the ability to set actuators
  • compatible with Prometheus for metric alerting, collecting and data visualization

Schema:

laporte schema

Features:

  • can evaluate, recalculate or correct metric
  • calculate new metric or state from other metrics
  • automation using a true algorithmization + data structures (python expression code)
  • can set TTL for metrics (obsolete metric disappears when time is over)
  • communicates via:
    • RESTful API
    • realtime, bidirectionally using Socket.IO
    • exporting data as Prometheus metrics
    • live www status page
  • optional bridges (extensions):

Installation:

To install Laporte from PyPI:

pip install laporte

Or using container image from Docker Hub:

docker pull vinklat/laporte

Quick HOWTO:

Example: push gateway for weather sensor

  • manually simulate a weather sensor and send temperature and relative humidity data to this gateway using REST API
  • in this example the temperature will be corrected (slope +1% and shift + 0.5). Can be used in case of calibrate sensor, unit conversion, ...
  • other two new metrics will be calculated (dew point temperature and absolute humidity)
  • in the case of an inactive sensor, the data expires in 10 minutes

a) run the docker image

docker run -p 9128:9128 vinklat/laporte -c conf/example_weatherstation.yml

(the content of this built-in config file can be seen here: example_weatherstation.yml)

b) send metrics from sensor via REST API

Try sending data several times using curl:

curl http://localhost:9128/api/metrics/weather1 -d temp_celsius=37.5 -d hum_ratio=0.8 -X PUT

c) watch status

...more info on the wiki

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for laporte, version 0.4.2
Filename, size File type Python version Upload date Hashes
Filename, size laporte-0.4.2-py2-none-any.whl (23.2 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size laporte-0.4.2.tar.gz (17.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page