项目作者: basvdlei

项目描述 :
Slimme Meter (Smart Meter) Prometheus exporter
高级语言: Go
项目地址: git://github.com/basvdlei/gotsmart.git
创建时间: 2017-06-14T21:32:50Z
项目社区:https://github.com/basvdlei/gotsmart

开源协议:BSD 3-Clause "New" or "Revised" License

下载


GotSmart

GotSmart collects data from the Dutch SlimmeMeter (translates as Smart Meter)
to export as Prometheus metrics.

Setup

Build

  1. go install github.com/basvdlei/gotsmart

Run

Specify the serial device that is connected with the Smart Meter.

  1. gotsmart -device /dev/ttyS0

Setup with Docker

Build

  1. docker build -t gotsmart .

Run

Make sure to add the serial device that is connected with the Smart Meter to
the container. (ttyS0, ttyUSB0, ttyAMA0, etc)

  1. docker run -d -p 8080:8080 --device /dev/ttyS0:/dev/ttyS0 gotsmart

Usage

By default gotsmart listens on port 8080 and exposes the metrics on /metrics.

Build for Raspberry Pi

GotSmart can run on Raspberry Pi. To cross compile use:

  1. GOARCH=arm go build