Answer the question
In order to leave comments, you need to log in
How to update data in index using Logstash?
Hello comrades! Please help me figure it out.
There is a table in a PostgreSQL 10 database . Plus or minus seven thousand records pour in every hour.
Based on this table, I created an index in Elasticsearch using a Logstash script . It looks like this:
input {
jdbc {
jdbc_connection_string => "jdbc:postgresql://@host:@port/@database"
jdbc_user => "@username"
jdbc_password => "@password"
jdbc_driver_library => "C:\postgresql-42.2.5.jar"
jdbc_driver_class => "org.postgresql.Driver"
statement => "SELECT * from table_name"
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "table_name"
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question