Im using the below config file to push data from mongodb to elastic search
input{
mongodb{
uri=>[""]
placeholder_db_dir=>"C:\Windows\System32"
placeholder_db_name=>"logstash_sqlite.db"
collection=>"menus"
batch_size=>100
}
}
filter{
}
output{
stdout{
codec=>"rubydebug"
}
elasticsearch{
action=>"index"
index=>"mongo_log_data_1"
hosts=>["localhost:9200"]
}
}
I'm getting the below error message.
Sending Logstash logs to C:/logstash-7.9.2/logs which is now configured via log4j2.properties
[2020-10-12T12:00:08,252][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.9.2", "jruby.version"=>"jruby 9.2.13.0 (2.5.7) 2020-08-03 9a89c94bcc Java HotSpot(TM) Client VM 25.261-b12 on 1.8.0_261-b12 +indy +jit [mswin32-i386]"}
[2020-10-12T12:00:08,636][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2020-10-12T12:00:10,530][INFO ][org.reflections.Reflections] Reflections took 62 ms to scan 1 urls, producing 22 keys and 45 values
[2020-10-12T12:00:16,311][INFO ][logstash.inputs.mongodb ] Using version 0.1.x input plugin 'mongodb'. This plugin isn't well supported by the community and likely has no maintainer.
[2020-10-12T12:00:17,671][INFO ][logstash.outputs.elasticsearch][main] Elasticsearch pool URLs updated {:changes=>{:removed=>, :added=>[http://localhost:9200/]}}
[2020-10-12T12:00:17,910][WARN ][logstash.outputs.elasticsearch][main] Restored connection to ES instance {:url=>"http://localhost:9200/"}
[2020-10-12T12:00:17,999][INFO ][logstash.outputs.elasticsearch][main] ES Output version determined {:es_version=>7}
[2020-10-12T12:00:18,005][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}
[2020-10-12T12:00:18,064][INFO ][logstash.outputs.elasticsearch][main] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["//localhost:9200"]}
[2020-10-12T12:00:18,123][INFO ][logstash.outputs.elasticsearch][main] Using a default mapping template {:es_version=>7, :ecs_compatibility=>:disabled}
[2020-10-12T12:00:18,171][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:/logstash-7.9.2/bin/mongodatap.conf"], :thread=>"#<Thread:0x86d9f4 run>"}
[2020-10-12T12:00:18,204][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"}}}}}}}
[2020-10-12T12:00:19,183][INFO ][logstash.javapipeline ][main] Pipeline Java execution initialization time {"seconds"=>1.01}
[2020-10-12T12:00:20,130][ERROR][logstash.agent ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create, action_result: false", :backtrace=>nil}
[2020-10-12T12:00:20,506][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2020-10-12T12:00:25,389][INFO ][logstash.runner ] Logstash shut down.
[2020-10-12T12:00:25,405][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
Please help me on this.