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 #7191

Closed
ghost opened this issue May 24, 2017 · 1 comment
Closed

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

ghost opened this issue May 24, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented May 24, 2017

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

@jsvd
Copy link
Member

jsvd commented Aug 4, 2017

closing as duplicate logstash-plugins/logstash-filter-csv#53

@jsvd jsvd closed this as completed Aug 4, 2017
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