Skip to content

parse go-formatted timestamp from csv  #6386

Closed
@juko-bal

Description

Relevant telegraf.conf:

[input.file]
csv_timestamp_format="02.01.2006 15:04:05"
    data_format="csv"
    csv_column_names = ["a","time","b", "c", "d"]
   (same behaviourwith or without next line)
    csv_column_types = ["string","string","string","string","string"] 
    csv_delimiter=";"
    csv_tag_columns=["c"]
    csv_measurement_column="a"
    csv_timestamp_column="time"

System info:

Telegraf V1.12.1
on Debian Buster

Steps to reproduce:

  1. csv_timestamp_format="02-01-2006 15:04:05"
    file data ...;"09-07-2019 00:11:00";...

  2. csv_timestamp_format="02.01.2006 15:04:05"
    file data ...;"09.07.2019 00:11:00";...

Expected behavior:

Both format strings(1) and (2) should work

Actual behavior:

Configuration 1 operates as expected
Configuration 2 throws error
[inputs.file] Error in plugin: strconv.ParseInt: parsing "07.2019 0": invalid syntax

Additional info:

Configuration (2) worked in a previous test. Version? (spring 2019)

Metadata

Assignees

Labels

bugunexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions