Import CSV to influxDB using telegraf

Hi there,

I have CSV data that I would like to import into grafana using telegraf and having some issues. This is my first time using TIG stack and I am confused if I am even doing it right.

Sorry for the large amount of data below, I couldn’t upload file due to account age:

Sample CSV data:

iso_code,continent,location,date,total_cases,new_cases,new_cases_smoothed,total_deaths,new_deaths,new_deaths_smoothed,total_cases_per_million,new_cases_per_million,new_cases_smoothed_per_million,total_deaths_per_million,new_deaths_per_million,new_deaths_smoothed_per_million,reproduction_rate,icu_patients,icu_patients_per_million,hosp_patients,hosp_patients_per_million,weekly_icu_admissions,weekly_icu_admissions_per_million,weekly_hosp_admissions,weekly_hosp_admissions_per_million,total_tests,new_tests,total_tests_per_thousand,new_tests_per_thousand,new_tests_smoothed,new_tests_smoothed_per_thousand,positive_rate,tests_per_case,tests_units,total_vaccinations,new_vaccinations,new_vaccinations_smoothed,total_vaccinations_per_hundred,new_vaccinations_smoothed_per_million,stringency_index,population,population_density,median_age,aged_65_older,aged_70_older,gdp_per_capita,extreme_poverty,cardiovasc_death_rate,diabetes_prevalence,female_smokers,male_smokers,handwashing_facilities,hospital_beds_per_thousand,life_expectancy,human_development_index
USA,North America,United States,2021-01-17T23:30:00,23936773,177918,218100.857,397600,1749,3323.286,72315.956,537.512,658.91,1201.199,5.284,10.04,,,,,,,,,,,,,,,,,,,,,,,,,331002647,35.608,38.3,15.413,9.732,54225.446,1.2,151.089,10.79,19.1,24.6,,2.77,78.86,0.924

telegraf.conf

Summary
[agent]
  interval = "10s"
  round_interval = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"
  flush_interval = "10s"
  flush_jitter = "0s"
  precision = ""
  hostname = ""
  omit_hostname = false
[[outputs.influxdb]]
  urls = []
  database = "COVID19"
[[inputs.file]]
  files = ["/data/COVID19/owid-covid-data.csv"]
  data_format = "csv"
  csv_header_row_count = 1
  csv_skip_rows = 0
  csv_skip_columns = 0
  csv_comment = "#"
  csv_timestamp_column = "date"
  csv_timestamp_format = "2006-01-02T15:04:05"

It looks like telegraf is writing data to the DB however when trying to query the data I am not getting anything back.

I am connecting to influx and running:

use DBNAME
SELECT * FROM DBNAME

any ideas what I am doing wrong here? Thank you!!

BTW I removed some links because it does not allow me to post them,

You have no urls specified for your outputs.influxdb.
also you might want to try inputs.tail instead of inputs.file, as file doesn’t do what you are expecting.