Having a stream input with Telegraf

Extremely easy way is to install Node-Red and use the node-red-serialport and node-red-contrib-influxdb additions to wire it all up. No coding required.