raj kamal
raj kamal

Reputation: 1

issue in importing csv logstash 2.3.4 windows

  1. Logstash.conf

    input {    
        file {
            path => "C:\xampp\htdocs\logstash\sample.csv"
            sincedb_path => "/dev/null"
        }
    }
    filter {
        csv {
            columns => ["Date","Open","High","Low","Close","Volume","Adj Close"]      
            separator => "," 
        }
    }
    output {
        stdout { codec => rubydebug }
        elasticsearch {
            hosts => "localhost:9200"
            index => "stocks"       
            document_type => "stock"
        }
    }
    

    Error stuck at:

    Microsoft Windows [Version 10.0.10586] (c) 2015 Microsoft Corporation. All rights reserved.

    C:\Users\user1>cd C:\xampp\htdocs\logstash

    C:\xampp\htdocs\logstash>logstash -f logstash.conf -v io/console not supported; tty will not be manipulated starting agent

    {:level=>:info} starting pipeline {:id=>"main", :level=>:info}
    Settings: Default pipeline workers: 4 Registering file input
    {:path=>["C:\\xampp\\htdocs\\logstash\\sample.csv"], :level=>:info}
    
    Using mapping template from {:path=>nil, :level=>:info} Attempting
    to install template {:manage_template=>{"template"=>"logstash-*",
    "settings"=>{"index.refresh_interval"=>"5s"},
    "mappings"=>{"_default_"=>{"_all"=>{"enabled"=>true,
    "omit_norms"=>true},
    "dynamic_templates"=>[{"message_field"=>{"match"=>"message",
    "match_mapping_type"=>"string", "mapping"=>{"type"=>"string",
    "index"=>"analyzed", "omit_norms"=>true,
    "fielddata"=>{"format"=>"disabled"}}}},
    {"string_fields"=>{"match"=>"*", "match_mapping_type"=>"string",
    "mapping"=>{"type"=>"string", "index"=>"analyzed",
    "omit_norms"=>true, "fielddata"=>{"format"=>"disabled"},
    "fields"=>{"raw"=>{"type"=>"string", "index"=>"not_analyzed",
    "ignore_above"=>256}}}}}],
    "properties"=>{"@timestamp"=>{"type"=>"date"},
    "@version"=>{"type"=>"string", "index"=>"not_analyzed"},
    "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"},
    "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"float"},
    "longitude"=>{"type"=>"float"}}}}}}}, :level=>:info} New
    
    Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch",
    :hosts=>["localhost:9200"], :level=>:info} Starting pipeline
    {:id=>"main", :pipeline_workers=>4, :batch_size=>125,
    :batch_delay=>5, :max_inflight=>500, :level=>:info} Pipeline main started
    

Upvotes: 0

Views: 98

Answers (1)

Patrick
Patrick

Reputation: 21

could be Windows style paths not supported; therefore, try change this

path => "C:\xampp\htdocs\logstash\sample.csv"

to

path => "C:/xampp/htdocs/logstash/sample.csv"

works on my Logstash.

Upvotes: 1

Related Questions