# Logstash pipeline with MongoDB input jdbc

**URL:** <https://discuss.elastic.co/t/logstash-pipeline-with-mongodb-input-jdbc/114273>\
**Category:** Logstash\
**Created:** [January 5, 2018, 10:47am UTC](https://discuss.elastic.co/t/logstash-pipeline-with-mongodb-input-jdbc/114273 "2018-01-05T10:47:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahajan344](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@mahajan344](https://discuss.elastic.co/u/mahajan344)\
**Post date:** [January 5, 2018, 10:47am UTC](https://discuss.elastic.co/t/logstash-pipeline-with-mongodb-input-jdbc/114273/1 "2018-01-05T10:47:00Z")

</div>

Hi,

I wanted to create a logstash pipeline to have input from MongoDB and output to Elasticsearch.  
Since MongoDB don't have any offcial JDBC driver. So I am using unityjdbc driver for MongoDB.

I have create a simple pipeline and placed it inside bin folder. Here is content of pipleline

> input{  
> jdbc{  
> jdbc\_driver\_library =\> "C:/Program Files/UnityJDBC/mongodb\_unityjdbc\_full.jar"  
> jdbc\_driver\_class =\> "mongodb.jdbc.MongoDriver"  
> jdbc\_connection\_string =\> "jdbc:mongodb://abc.com:27017/test"  
> jdbc\_user =\> ""  
> statement =\> "\*"  
> }  
> }
> 
> output {  
> elasticsearch {  
> hosts =\> '[http://localhost:9200](http://localhost:9200)'  
> index =\> 'mongo'  
> }  
> stdout { codec =\> rubydebug }  
> }

Now when I try to run using command line I am getting error

Command I am using t execute this pipeline on windows is as follows :

```
C:\logstash-6.1.0\logstash-6.1.0>bin\logstash -f C:\logstash-6.1.0\logstash-6.1.0\bin\logstash-mongo.conf

```

And I am getting error :

> Sending Logstash's logs to C:/logstash-6.1.0/logstash-6.1.0/logs which is now configured via log4j2.properties  
> [2018-01-05T15:13:02,572][INFO][logstash.modules.scaffold] Initializing module {:module\_name=\>"fb\_apache", :directory=\>"C:/logstash-6.1.0/logstash-6.1.0/modules/fb\_apache/configuration"}  
> [2018-01-05T15:13:02,590][INFO][logstash.modules.scaffold] Initializing module {:module\_name=\>"netflow", :directory=\>"C:/logstash-6.1.0/logstash-6.1.0/modules/netflow/configuration"}  
> [2018-01-05T15:13:02,797][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified  
> [2018-01-05T15:13:03,363][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"6.1.0"}  
> [2018-01-05T15:13:03,452][INFO][logstash.config.source.local.configpathloader] No config files found in path {:path=\>"C:/logstash-6.1.0/logstash-6.1.0/bin/logstash-mongo.conf"}  
> [ERROR] 2018-01-05 15:13:03.464 [Ruby-0-Thread-1: C:\logstash-6.1.0\logstash-6.1.0\lib\bootstrap\environment.rb:6] sourceloader - No configuration found in the configured sources.  
> [2018-01-05T15:13:03,664][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}

Now if I run simple text pipeline i don't see this error

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 2, 2018, 10:47am UTC](https://discuss.elastic.co/t/logstash-pipeline-with-mongodb-input-jdbc/114273/2 "2018-02-02T10:47:02Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
