jimmale / gosensor

A small application to report temperatures from ds18b20 sensors in influx line protocol format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gosensor

A small GoLang application to read the temperatures from ds18b20 style sensors and report it to stdout in influxdb format.

This is a very good companion to Telegraf's exec input plugin.

Building

go build .

Adding to Telegraf

Copy the executable into the $PATH

cp ./gosensor /usr/local/bin/gosensor

Add this to your Telegraf configuration:

[[inputs.exec]]
  commands = [
        "gosensor"
   ]
   timeout = "60s"
   data_format = "influx"

And reload telegraf with sudo service telegraf reload

About

A small application to report temperatures from ds18b20 sensors in influx line protocol format

License:Apache License 2.0


Languages

Language:Go 100.0%