Thumbnail: imageit

Python 2 Influx via Telegraf

on under Influx
1 minute read

So you’ve got some simple data, and you need it to send it towards influxdb

Really, there are libraries for this.

  • libraries don’t work if you have no internet
  • Or maybe you want portability

Using telegraf, we can parse many simple input formats, including:

  • Value

    a single value

  • CSV

    a line of delimited values

  • Influx Line Protocol

    a line of metrics, separated into tags and fields and ready for storage

  • JSON

    a mixed bag - could be separated, could be just random. The biggest and slowest of the four.

Each with their own advantages and disadvantages.

Influx Line protocol is my preferred - easy to read on a screen or from a file, and easy to grep through.

Some pain in escaping characters if building it yourself.

influxdb, influx, devops, telegraf