Python 2 Influx via Telegraf
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.
I feedback.
Let me know what you think of this article on twitter @klc_!
Let me know what you think of this article on twitter @klc_!