Python 2 Influx via Telegraf
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:
a single value
a line of delimited values
- Influx Line Protocol
a line of metrics, separated into tags and fields and ready for storage
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.
Let me know what you think of this article on twitter @klc_!