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

Filter CSV convert doesn't work as documentation says #53

Open
jsvd opened this issue Aug 4, 2017 · 0 comments
Open

Filter CSV convert doesn't work as documentation says #53

jsvd opened this issue Aug 4, 2017 · 0 comments

Comments

@jsvd
Copy link
Member

jsvd commented Aug 4, 2017

migrated from elastic/logstash#7191


Hello, i'm configuring logstash for parsing some csv files. I wanted to use the convert option from the CSV filter as in https://www.elastic.co/guide/en/logstash/current/plugins-filters-csv.html#plugins-filters-csv-convert

  • Version: 5.4.0
  • Operating System: RHEL
  • Config File

filter {
    csv {
        skip_empty_columns => "true"
        separator => "," 
        autogenerate_column_names => "true"
    
        convert  => [ "timeStamp" => "date_time" , "elapsed" => "integer" , "responseCode" => "integer" , "success" => "boolean" , "bytes" => "integer" , "Latency" => "integer" , "IdleTime" => "integer" 
        add_tag => [ "JMETER" ]
  }
}

Result of the config test :

Sending Logstash's logs to /exploit/logstash/logs/ which is now configured via log4j2.properties
[2017-05-24T10:55:12,964][FATAL][logstash.runner          ] The given configuration is invalid. Reason: Expected one of #, {, } at line 22, column 45 (byte 582) after filter {
  csv {
    skip_empty_columns => "true"
    separator => ","
    autogenerate_column_names => "true"
    #columns => [ "timeStamp","elapsed","label","responseCode","responseMessage","threadName","dataType","success","failureMessage","bytes","grpThreads","allThreads","Latency","IdleTime"]
    convert  => { "timeStamp" => "date_time"
  • Steps to Reproduce: was working with a convert option by colum to filter

like mutate convert https://www.elastic.co/guide/en/logstash/current/plugins-filters-mutate.html#plugins-filters-mutate-convert )

convert => { "timeStamp" => "date"}

Thanks for clearing this case ! :)

David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant