I have been trying to get a simple csv file into Telegraf and it is driving me crazy as I am obviously doing something wrong.
The telegraf logs indicate thhe first chnage to the csv file has been accepted into the db but on the subsequent csv file updates it throws an error.
It seems no matter what I do I get the same error.
The csv file is:
junk,tank,fixed,time_of_day,leftover
,tank01,2022-03-03 11:07:00,11,1
The csv settings in telegraf.conf are:
data_format = “csv”
csv_header_row_count = 1
csv_skip_columns = 1
csv_delimiter = “,”
csv_comment = “#”
csv_measurement_column = “tank”
csv_timestamp_column = “fixed”
csv_timestamp_format = “2006-01-02 15:04:05”
The telegraf log shows the following:
2022-03-04T20:19:10Z D! [inputs.tail] Tail added for “/share/telegraf/junk.csv”
2022-03-04T20:19:20Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-03-04T20:19:30Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-03-04T20:19:40Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-03-04T20:19:50Z D! [outputs.influxdb] Wrote batch of 1 metrics in 27.09967ms
2022-03-04T20:19:50Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-03-04T20:20:00Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-03-04T20:20:07Z E! [inputs.tail] Malformed log line in “/share/telegraf/junk.csv”: ["\ufeffjunk,tank,fixed,time_of_day,leftover"]: parsing time “fixed” as “2006-01-02 15:04:05”: cannot parse “fixed” as “2006”
2022-03-04T20:20:10Z D! [outputs.influxdb] Wrote batch of 1 metrics in 6.896025ms
2022-03-04T20:20:10Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics