Reading simple CSV doesn't produce any output

Hi all, I’ve used Telegraf and InfluxDb for a couple of years now to collect Windows Performance counters, a new requirement has popped up which means that I need to collect and send data regarding data in backlog (could be queues, files in directories etc), so far so good, I have services that collect all this information and dump them to a CSV file. Now here comes my problem:

The CSV:s looks something like this:

name,count,protocol,timestamp
Internal API,44,ServiceBus,2023-11-16 18:51:11
Incoming,0,SMB,2023-11-16 18:51:11
External API,0,ServiceBus,2023-11-16 18:51:11
Flatfiles,2,SMB,2023-11-16 18:51:11

Telegraf has been configured as:

[global_tags]
env = "TEST"

[agent]
  interval = "10s"
  round_interval = true
  metric_buffer_limit = 1000
  flush_buffer_when_full = true
  collection_jitter = "0s"
  flush_interval = "5s"
  flush_jitter = "0s"
  debug = true
  quiet = false
  logfile = "C:\\AppLogs\\Telegraf\\Telegraf.log"
  hostname = ""

[[outputs.influxdb]]
  urls = ["https://influxdb.test.internal:15970/"]
  database = "testlog"
  timeout = "5s"
  username = "logger"
  password = "xxxxxxxxx"

[[outputs.file]]
  files = ["stdout", "C:\\temp\\metrics.out"]
  data_format = "json"
  
[[inputs.file]]
  files = ["C:\\QueueCounterData\\TelegrafDump-OP.csv"]
  data_format = "csv"
  csv_header_row_count = 1
  csv_tag_columns = ["name","protocol"]
  csv_tag_overwrite = true
  csv_timestamp_column = "timestamp"
  csv_measurement_column = "count"
  csv_timestamp_format = "2006-01-02 15:04:05"

If I run telegraf using

telegraf.exe -config .\telegraf.conf --test

It shows me the contents of the CSV, but if I run it without the test parameter it does run, but all I can see in the logs is:

2023-11-16T17:36:30Z D! [outputs.file] Buffer fullness: 0 / 1000 metrics
2023-11-16T17:36:30Z D! [outputs.influxdb] Buffer fullness: 0 / 1000 metrics

And nothing ever gets written to either the output file or to influx.
I’ve tried fiddling around a bit with the csv settings, but to no avail.

Anyone of you guys who knows where I’m going completely wrong here?

This doesn’t mean what you think it means :wink: From the docs:

  ## The column to extract the name of the metric from. Will not be
  ## included as field in metric.
  csv_measurement_column = ""

Measurement column is the name of column to get the name of the measurement from i.e. you want the measurement to be called the value in this column. It is not the column that defines the value of the measurement.

As-is you have no fields since everything else is tag or timestamp. Remove that line and you will have metrics.

Ah, a bit too quick in my reading there. Thanks for the answer. :slight_smile: