I want to read a plain text file. For this I use Tail Input Plugin. The configuration file is this:
[[inputs.tail]]
files =
["/home/nikitalipatov/Programing/Projects/Diploma/TestData/test.txt"]
from_beginning = true
data_format = "influx"
[[outputs.file]]
files = ["stdout",
"/home/nikitalipatov/Programing/Projects/Diploma/TestData/log.text"]
data_format = "influx"
Contents of the text file:
data1
data2
data3
But when I try to start Telegraf, I get this kind of error:
telegraf[14541]: 2018-05-16T16:46:24Z E! Error in plugin [inputs.tail]: E! Malformed log line in /home/nikitalipatov/Programing/Projects/Diploma/TestData/1.txt: [data1], Error: metric parse error: expected field at offset 5: "data1\n"