# Connect to postgres dB using logstash

**URL:** <https://discuss.elastic.co/t/connect-to-postgres-db-using-logstash/223487>\
**Category:** Logstash\
**Created:** [March 13, 2020, 10:40am UTC](https://discuss.elastic.co/t/connect-to-postgres-db-using-logstash/223487 "2020-03-13T10:40:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thamini\_NellaiKumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thamini_nellaikumar/32/62550_2.png) [@Thamini\_NellaiKumar](https://discuss.elastic.co/u/Thamini_NellaiKumar)\
**Post date:** [March 13, 2020, 10:40am UTC](https://discuss.elastic.co/t/connect-to-postgres-db-using-logstash/223487/1 "2020-03-13T10:40:01Z")

</div>

I have a postgres dB in one server and elk in another server. I want to load data from postgres dB to elastic search using logstash. How can I do this? In which server, should the jdbc driver be installed?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 13, 2020, 5:49pm UTC](https://discuss.elastic.co/t/connect-to-postgres-db-using-logstash/223487/2 "2020-03-13T17:49:35Z")

</div>

> [@Thamini\_NellaiKumar](#):
>
> In which server, should the jdbc driver be installed?

It should be installed where logstash runs.

---

<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:30pm UTC](https://discuss.elastic.co/t/connect-to-postgres-db-using-logstash/223487/3 "2020-03-18T13:30:35Z")

</div>

Hi @Thamini_NellaiKumar.

`I think below link is perfect match with your requirement .`

> Please check -  
> [Configure logstash input from DB values - #2 by rameshkr1994](https://discuss.elastic.co/t/configure-logstash-input-from-db-values/223873/2)

Thanks  
HadoopHelp

---

<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, 1:30pm UTC](https://discuss.elastic.co/t/connect-to-postgres-db-using-logstash/223487/4 "2020-04-15T13:30:38Z")

</div>

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