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:
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):
- laporte-mqtt to connect a large family of devices using MQTT protocol
- laporte-journal to store all events into other database
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
- Laporte status page: http://localhost:9128
- JSON response of REST API: http://localhost:9128/api/metrics/by_node
- Prometheus metrics: http://localhost:9128/prom
...more info on the wiki
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4694fe442864c55fe26ee03dc76b533b75a46af523f1120f7ef34863527fd1d0
|
|
| MD5 |
00b400a487ac913b80d1aa73a25c63f7
|
|
| BLAKE2b-256 |
28f89b29e969dcd8cb80a1d4ad32e625c34d2b7af3c0be9e9c6903db470dfe81
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ecebb78cf3afaec342f798becf242acc24e58953db964929c184437649fcb2d
|
|
| MD5 |
ff965738f42b3f25db41b139a665c84e
|
|
| BLAKE2b-256 |
7a38f5e30c520b9a3a2e94c55ec8800f57d6dd6b3ba66e99e562212808d09b24
|