Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse go-formatted timestamp from csv #6386

Closed
juko-bal opened this issue Sep 12, 2019 · 0 comments · Fixed by #6390
Closed

parse go-formatted timestamp from csv #6386

juko-bal opened this issue Sep 12, 2019 · 0 comments · Fixed by #6390
Assignees
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@juko-bal
Copy link

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)

@danielnelson danielnelson self-assigned this Sep 12, 2019
@danielnelson danielnelson added this to the 1.12.2 milestone Sep 12, 2019
@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants