Hi,
I am trying to upload data via logstash in ElasticSearch but somehow not able to do.
Could you pls chk the conf file and logstash logs and suggest for the same.
input {
file {
path => "C:\Users\SaurabhJain\Desktop\ElasticSearch_Kibana\countries-of-the-world\countriesoftheworld.csv"
start_position => "beginning"
sincedb_path => "NUL"
close_older => "1 hour"
stat_interval => "1 second"
}
}
filter {
csv {
separator => ","
columns => ["Country","Region","Population","Area"]
}
mutate {convert => ["Population", "integer"]}
mutate {convert => ["Area", "integer"]}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "countriesdata-%{+dd.MM.YYYY}"
}
stdout {codec => json_lines }
}
C:\Users\SaurabhJain\Desktop\ElasticSearch_Kibana>logstash -f country.conf
Thread.exclusive is deprecated, use Thread::Mutex
Sending Logstash logs to C:/Users/SaurabhJain/Desktop/ElasticSearch_Kibana/logstash-7.5.1.tar/logstash-7.5.1/logs which is now configured via log4j2.properties
[2019-12-30T15:21:24,805][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-12-30T15:21:24,921][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.5.1"}
[2019-12-30T15:21:26,262][INFO ][org.reflections.Reflections] Reflections took 41 ms to scan 1 urls, producing 20 keys and 40 values
[2019-12-30T15:21:27,179][INFO ][logstash.outputs.elasticsearch][main] Elasticsearch pool URLs updated {:changes=>{:removed=>, :added=>[http://localhost:9200/]}}
[2019-12-30T15:21:27,349][WARN ][logstash.outputs.elasticsearch][main] Restored connection to ES instance {:url=>"http://localhost:9200/"}
[2019-12-30T15:21:27,380][INFO ][logstash.outputs.elasticsearch][main] ES Output version determined {:es_version=>7}
[2019-12-30T15:21:27,380][WARN ][logstash.outputs.elasticsearch][main] Detected a 6.x and above cluster: the type
event field won't be used to determine the document _type {:es_version=>7}
[2019-12-30T15:21:27,433][INFO ][logstash.outputs.elasticsearch][main] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["//localhost:9200"]}
[2019-12-30T15:21:27,465][INFO ][logstash.outputs.elasticsearch][main] Using default mapping template
[2019-12-30T15:21:27,511][WARN ][org.logstash.instrument.metrics.gauge.LazyDelegatingGauge][main] A gauge metric of an unknown type (org.jruby.specialized.RubyArrayOneObject) has been create for key: cluster_uuids. This may result in invalid serialization. It is recommended to log an issue to the responsible developer/development team.
[2019-12-30T15:21:27,511][INFO ][logstash.javapipeline ][main] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>1000, "pipeline.sources"=>["C:/Users/SaurabhJain/Desktop/ElasticSearch_Kibana/country.conf"], :thread=>"#<Thread:0x5074bc run>"}
[2019-12-30T15:21:27,549][INFO ][logstash.outputs.elasticsearch][main] Attempting to install template {:manage_template=>{"index_patterns"=>"logstash-", "version"=>60001, "settings"=>{"index.refresh_interval"=>"5s", "number_of_shards"=>1}, "mappings"=>{"dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false}}}, {"string_fields"=>{"match"=>"", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false, "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date"}, "@version"=>{"type"=>"keyword"}, "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"}, "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"half_float"}, "longitude"=>{"type"=>"half_float"}}}}}}}
[2019-12-30T15:21:28,097][INFO ][logstash.javapipeline ][main] Pipeline started {"pipeline.id"=>"main"}
[2019-12-30T15:21:28,135][INFO ][filewatch.observingtail ][main] START, creating Discoverer, Watch with file and sincedb collections
[2019-12-30T15:21:28,151][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>}
[2019-12-30T15:21:28,467][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}