Hello,
In my logstash file, I input my data from a mysql database and then do some transformations and insert in elasticsearch. I used the action update to always have the most updated information. However, if I delete some lines of mysql database, how I can delete those lines from elasticsearch?
Well, it is possible. You could use an elasticsearch input to read all the documents, then use a jdbc_streaming to look them up in MySQL. If you find it in the DB then drop {} the event, otherwise send it to an elasticsearch output with the action option set to delete.
You would need to be careful around error handling. A database error will result in you deleting records from elasticsearch. It sounds really fragile to me.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.