Skip to main content

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

Release files for laporte 0.7.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for laporte 0.7.5
File Size Uploaded
laporte-0.7.5.tar.gz 86.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for laporte 0.7.5
File Interpreter ABI Platform
laporte-0.7.5-py3-none-any.whl Python 3 none any Details

Total release size: 182.9 kB

Release files / laporte-0.7.5.tar.gz

Download URL laporte-0.7.5.tar.gz
Size 86.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4694fe442864c55fe26ee03dc76b533b75a46af523f1120f7ef34863527fd1d0
BLAKE2b-256 checksum
How to use checksums
28f89b29e969dcd8cb80a1d4ad32e625c34d2b7af3c0be9e9c6903db470dfe81
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / laporte-0.7.5-py3-none-any.whl

Download URL laporte-0.7.5-py3-none-any.whl
Size 96.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ecebb78cf3afaec342f798becf242acc24e58953db964929c184437649fcb2d
BLAKE2b-256 checksum
How to use checksums
7a38f5e30c520b9a3a2e94c55ec8800f57d6dd6b3ba66e99e562212808d09b24
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.7.5 This release

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page