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.

Source Distribution

laporte-0.7.5.tar.gz (86.3 kB view details)

Uploaded Source

Built Distribution

laporte-0.7.5-py3-none-any.whl (96.6 kB view details)

Uploaded Python 3

File details

Details for the file laporte-0.7.5.tar.gz.

File metadata

  • Download URL: laporte-0.7.5.tar.gz
  • Upload date:
  • Size: 86.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.7

File hashes

Hashes for laporte-0.7.5.tar.gz
Algorithm Hash digest
SHA256 4694fe442864c55fe26ee03dc76b533b75a46af523f1120f7ef34863527fd1d0
MD5 00b400a487ac913b80d1aa73a25c63f7
BLAKE2b-256 28f89b29e969dcd8cb80a1d4ad32e625c34d2b7af3c0be9e9c6903db470dfe81

See more details on using hashes here.

File details

Details for the file laporte-0.7.5-py3-none-any.whl.

File metadata

  • Download URL: laporte-0.7.5-py3-none-any.whl
  • Upload date:
  • Size: 96.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.7

File hashes

Hashes for laporte-0.7.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4ecebb78cf3afaec342f798becf242acc24e58953db964929c184437649fcb2d
MD5 ff965738f42b3f25db41b139a665c84e
BLAKE2b-256 7a38f5e30c520b9a3a2e94c55ec8800f57d6dd6b3ba66e99e562212808d09b24

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page