I have created indexes and fields in ElasticSearch. I could successfully run Logstash config file to add data from MySQL database table into ElasticSearch using the following command :
bin/logstash -f [PATH TO LOGSTASH CONFIG FILE] -v
I need to run this command from my Java source code. How do I run this logstash config file from Java code?
Try this and this works fine with few changes to the above mentioned code:
try {
Try this code. It works.