I’m trying to use the tail-plugin in telegraf to read data from a log file and push it into influxdb.
The logfile only contains temperature values that are created by an arduino, and would look like this:
23,4
23,5
23,6
23,7
and so on. New measurements are constantly beeing added.
I’m trying this configuration in telegraf.config:
[[inputs.tail]]
files = [“C:\Program Files\Telegraf\arduino.log”]
from_beginning = false
grok_patterns = ["%{CUSTOM_LOG}"]
grok_custom_patterns = ‘’’
%{NUMBER:temperature:float}
‘’’
data_format = “grok”
but I’m getting an error : panic: runtime error: index out of range [1] with length 1
Does anyone know how to solve this? Maybe I dont even have to use grok patterns since per line theres the one information that i need?
Forgive me if this is utterly stupid but I’m a complete beginner with this