# Configure logstash input from DB values

**URL:** <https://discuss.elastic.co/t/configure-logstash-input-from-db-values/223873>\
**Category:** Logstash\
**Created:** [March 17, 2020, 8:12am UTC](https://discuss.elastic.co/t/configure-logstash-input-from-db-values/223873 "2020-03-17T08:12:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan2](https://avatars.discourse-cdn.com/v4/letter/r/7ab992/32.png) [@Ryan2](https://discuss.elastic.co/u/Ryan2)\
**Post date:** [March 17, 2020, 8:12am UTC](https://discuss.elastic.co/t/configure-logstash-input-from-db-values/223873/1 "2020-03-17T08:12:51Z")

</div>

Hi Team, as I am new to the ELK technology i need some help on this. I've a requirement in which i need to get log location(More than 1 for sure)s from a DB table and pass those values in logstash input to view the data in kibana. Can you please share some examples from which I'll refer and go ahead .

---

<div class="post-metadata">

**Author:** ![rameshkr1994](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rameshkr1994/32/59029_2.png) [@rameshkr1994](https://discuss.elastic.co/u/rameshkr1994)\
**Post date:** [March 18, 2020, 1:18pm UTC](https://discuss.elastic.co/t/configure-logstash-input-from-db-values/223873/2 "2020-03-18T13:18:12Z")

</div>

hello @Ryan2 welcome 😊

I understood your requirement -

please follow step/action require by you to perform the same-

Step 01-

```auto
You need database driver as per below logstash config.

```

lostashfile.conf

```auto
input {
  jdbc {
    jdbc_driver_library => "C:\Users\xxxx\Downloads\Elasticsearch\sqljdbc_4.2\enu\jre8\sqljdbc42.jar"
    #jdbc_driver_class => "com.microsoft.jdbc.sqlserver.SQLServerDriver"
	jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
    jdbc_connection_string => "jdbc:sqlserver:/XXXXXX;integratedSecurity=false;"
	
    
    jdbc_user => "user"
	jdbc_password => "pass"
	jdbc_validate_connection => true

    statement => "SELECT * FROM table1"
  }
}

output {
  elasticsearch {
    hosts => ["localhost:9200"]
    index => "dbdataindex"
  }
}

```

`after data available as index in elastic search then add use kibana as default config if using localhost.`

> for more reply

Thanks  
HadoopHelp

---

<div class="post-metadata">

**Author:** ![Ryan2](https://avatars.discourse-cdn.com/v4/letter/r/7ab992/32.png) [@Ryan2](https://discuss.elastic.co/u/Ryan2)\
**Post date:** [March 18, 2020, 2:46pm UTC](https://discuss.elastic.co/t/configure-logstash-input-from-db-values/223873/3 "2020-03-18T14:46:23Z")

</div>

Thanks ramesh for the reply. But my requirement is different from what you have answered. Its like there is table in database which stores log path location of different servers. I need to get those location from the table first and then I need pass those table data into input section of logstash and show the logs in kibana.

---

<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:** [April 15, 2020, 2:46pm UTC](https://discuss.elastic.co/t/configure-logstash-input-from-db-values/223873/4 "2020-04-15T14:46:27Z")

</div>

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