Skip to content

Tail input with csv-data and csv_skip_rows #5334

@joriws

Description

@joriws

My input.tail config is:

  files = ["testlog"]
  from_beginning = true
  pipe = false
  data_format = "csv"
  csv_skip_rows = 1
  csv_header_row_count = 1
  csv_delimiter = ","
  csv_trim_space = true
  csv_tag_columns = ["instance"]
  csv_timestamp_column = "date"
  csv_timestamp_format = "2006-01-02-15:04"

And testlog-file starts as..

version=13.0
date,instance,Incoming Requests,Outgoing Requests,Incoming Answers 2xxx,Outgoing Answers 2xxx,Incoming Answers UTD,Outgoing Answers UTD,Incoming Answers Redirect,Outgoing Answers Redirect,Incoming Answers Other,Outgoing Answers Other,Retransmit Requests,Rejected Requests Filtering,Rejected Requests In-gress Filtering,Rejected Requests Other,Timeout Requests,Discarded Answers

It seems that input is not skipping over line "version=13.0" which it should be according to " csv_skip_rows = 1".

If I comment out first line and csv_skip_rows then telegraf works as expected.

Error is:

2019-01-23T16:02:47Z D! [inputs.tail] tail added for file: testlog
2019-01-23T16:02:47Z E! [inputs.tail]: Error in plugin: E! Malformed log line in testlog: [date,instance,Incoming Requests,Outgoing Requests,Incoming Answers 2xxx,Outgoing Answers 2xxx,Incoming Answers UTD,Outgoing Answers UTD,Incoming Answers Redirect,Outgoing Answers Redirect,Incoming Answers Other,Outgoing Answers Other,Retransmit Requests,Rejected Requests Filtering,Rejected Requests In-gress Filtering,Rejected Requests Other,Timeout Requests,Discarded Answers], Error: timestamp column: date could not be found

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugunexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions