Arduino Prometheus Exporter.
Project description
Arduino Exporter
Arduino Prometheus Exporter
To use the exporter, follow the following steps
Create a python virtual environment.
$ python3 -m venv venv
$ source venv/bin/activate
Install arduino-exporter package with pip.
$ pip install arduino-exporter
To run the arduino exporter process.
$ python -m arduino_exporter.cli run $serial_port --p $http_port -vv >> /var/log/arduino_exporter.log
$ python -m arduino_exporter.cli run /dev/cu.usbmodem14101 --p 8000 -vv >> /var/log/arduino_exporter.log
Upload a sketch to the arduino to send the metrics to the serial port.
#define LED 13
void setup() {
Serial.begin(9600);
pinMode(LED, OUTPUT);
}
void loop() {
digitalWrite(LED, HIGH);
delay(1000);
digitalWrite(LED, LOW);
delay(1000);
Serial.write("{\"type\": \"counter\", \"name\": \"app_orders\", \"help\": \"the amount of orders.\", \"method\": \"inc\", \"value\": 1, \"labels\": {\"type\": \"trousers\"}}");
}
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
arduino_exporter-0.5.0.tar.gz
(12.5 kB
view hashes)
Built Distribution
Close
Hashes for arduino_exporter-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8448d9050f4f24270c51ea5f5bee39f8cb94ddfdb3b73b2c6fe2987dafa8c9d2 |
|
MD5 | d55e815be1c578cd45c3826312a30173 |
|
BLAKE2b-256 | 1dd352677808a8eee42737a42c613e111773b9912c842afce5bb029052ebc98d |