deviantony / docker-elk

The Elastic stack (ELK) powered by Docker and Compose.
MIT License
17.06k stars 6.74k forks source link

Connecting Postgresql database with elasticsearch #989

Closed limrik closed 3 months ago

limrik commented 3 months ago

Hi all, beginner here who just found out about elasticsearch in the past week.

I currently have a postgres database and was wondering how best would I ingest my data to elasticsearch to make search queries (fuzzy search). Do I have to use JDBC and logstash to ingest my data, if so how do I do that? Are there any alternatives because logstash seems like an overkill for the feature I am implementing.

Would appreciate any help thanks!

antoineco commented 3 months ago

docker-elk is a Docker setup to easily use Elastic products together. For support about those products themselves, please refer to https://discuss.elastic.co

Here are a few hints based on similar questions asked by other users: https://github.com/deviantony/docker-elk/issues?q=is%3Aissue+postgresql

This one in particular contains a full example:

limrik commented 3 months ago

Thank you for the response @antoineco, after I have connected my postgreSQL database using logstash and JDBC, would that mean that my data would be able to be accessed as an index in elasticsearch and kibana?

antoineco commented 3 months ago

Correct. It's up to you to determine how the DB data is being translated based on the use case.

For further information please refer to https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html