how to create a elastic watch which can identify the changes of data in a given index of elasticsearch

1.4k views Asked by At

In the offical site of Elastic Watcher, they said

  • Watcher is a plugin for Elasticsearch that provides alerting and notification based on changes in your data

  • The relevant data or changes in data can be identified with a periodic Elasticsearch query

What I want is a function like Trigger of MySQL, that is when a record is updated, a action is triggered.

But I didn't find a example or document to address this use case, can anybody tell me how to do this?

1

There are 1 answers

2
Andrei Stefan On

You define an input of type search and using body, indices (mainly) you define which indices to look at (indices) and what is the actual query (body). If you need other settings, there are many more things to configure. After this, you define a condition and an action to complete the flow.

Make an attempt and create a watch. If you have difficulties, provide details of what you tried in a different SO post (you realize your current post is not appropriate for SO since you ask for complete code without you trying anything).