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.1.tar.gz
(12.6 kB
view hashes)
Built Distribution
Close
Hashes for arduino_exporter-0.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2000908c028aa383e5556df3afe0318ebffa33e0f70f60301836b79cca5b5be9 |
|
MD5 | b21cb5bd19848f366fb4e69707021794 |
|
BLAKE2b-256 | 8174a39eb42ce257d2749d8985731a4ea219eb99a2c7a460cceae6768704debf |