Timestamp could not be found

Hi everyone,

This is my Telegraf Configuration:
csv_header_row_count = 1
csv_skip_rows = 0
csv_skip_columns = 0
csv_delimiter = “,”
csv_trim_space = false
csv_comment = “#”
csv_tag_columns = [“zipcode”, “country”]
csv_measurement_column = “temperature”
csv_timestamp_column = “timestamp”
csv_timestamp_format = “2006-01-02 15:04:05”

And this is my CSV file:

,94107,“usa”,75,“2015-06-19 16:15:00”
,94108,“spain”,80,“2015-06-19 16:15:00”
,94109,“france”,77,“2015-06-19 16:15:00”

This is the error that appears:

Error in plugin: timestamp column: timestamp could not be found
Error in plugin: parsing time “timestamp” as “2006-01-02 15:04:05”: cannot parse “timestamp” as "2006"

Thanks for your help

Which Telegraf version are you using?
I used your Telegraf config and your csv data in the same way and it worked. I got no error messages and Telegraf spit out the influx data correctly.
I suspect your csv data may not be formatted correctly?

EDIT: Btw, if you post code or data snippets, please put in i a code block, it is better readable and the text is not altered by the forums software.

Hi Franky1,

My Telegraf version y 1.21.3.

I changed my CSV file to

measurement_name;tag_value;1;1;1;"2021-02-01 15:04:05"
measurement_name;tag_value;2;2;2;"2021-02-01 15:04:06"
measurement_name;tag_value;3;3;3;"2021-02-01 15:04:07"

And my Telegraf config is

  files = ["C:/prueba/catalogo_cf.csv"]
  data_format = "csv"
  csv_header_row_count = 0
  csv_column_names = ["measurement_name","tag_key","field_one","field_two","field_three","time"]
  csv_skip_rows = 0
  csv_skip_columns = 0
  csv_delimiter = ";"
  csv_comment = ""
  csv_trim_space = false
  csv_tag_columns = ["tag_key"]
  csv_measurement_column = "measurement_name"
  csv_timestamp_column = "time"
  csv_timestamp_format = "2006-01-02 15:04:05"

Even if I don’t get any errors, my bucket still doesn’t get any data

Any suggestions?

How do you know that no data has arrived in the bucket?


  1. Have you selected the correct time frame in InfluxDB on the right-hand side? This is a common problem because then you don’t see any data.
  2. You could also add a file output in Telegraf for testing purposes:
[[outputs.file]]  # only for debugging
  files = ["csv.out"]
  influx_sort_fields = true

Hi Franky1,

This is what you mean by “correct time frame right”?

This is what i got in the output file, however somehow it doesn’t write anything on the InfluxDB Cloud.

measurement_name,host=SS-PORT32,tag=tag_value value1=1i,value2=2i,value3=3i 1612191845000000000
measurement_name,host=SS-PORT32,tag=tag_value value1=4i,value2=5i,value3=6i 1612191846000000000
measurement_name,host=SS-PORT32,tag=tag_value value1=7i,value2=8i,value3=9i 1612191847000000000

Do you know why?

Sorry for these beginners questions but I’m new into this world of telegraph and InfluxDB

Yes. I suspect your time frame is not selected properly, therefore you don’t see any data at all.
This is a common misunderstanding when using the InfluxDB UI.

I see no reason and no error message why the data from Telegraf should not end up in the bucket.
When I convert your timestamps to a real date, this is what I see:

Mon Feb 01 2021 15:04:07 GMT+0000

So they are over a year old!
Therefore, I suspect that your time window is not chosen correctly.
With Past 1m you won’t see anything…

1 Like

Thank you Franky1.

I spent hours trying to get this right. You saved me.

Till next time.