I am new to ES and logstash, I need help on ingesting a user collection data from a mongo database into elastic search.
I have used logstash-input-mongodb plugin and started the logstash and it failed with following error though the error out line in config file looks good.
C:>logstash-6.7.0\bin\logstash.bat -f logstash-6.7.0\config\logstash-mongo.conf
Sending Logstash logs to C:/logstash-6.7.0/logs which is now configured via log4j2.properties
[2020-01-23T18:14:06,538][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2020-01-23T18:14:06,557][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.7.0"}
[2020-01-23T18:14:07,479][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, { at line 2, column 7 (byte 16) after input {\r\n uri ", :backtrace=>["C:/logstash-6.7.0/logstash-core/lib/logstash/compiler.rb:4
Below is how my config file looks
input {
uri => 'mongodb://:@<mongo_host>:/?replicaSet=vncdev?ssl=true'
placeholder_db_dir => '/opt/logstash-mongodb/'
placeholder_db_name => 'logstash_sqlite.db'
collection => 'testcases'
batch_size => 5000
}
filter {
Thanks for the input, I am able to bypass the error after placing mongodb keyword after input as you mentioned.
I encountered additional error due to non-existance path /opt/logstash-mongodb.
My mongodb is on a RHEL 7 VM, what path should I mention for placeholder_db_dir and placeholder_db_name
i am using logstash 7.5.2 and trying to connect mongodb using JDBC driver but cant find the suitable driver across the unity, progress (third party drivers)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.