# Detect update in Elastic index and call an action

**URL:** <https://discuss.elastic.co/t/detect-update-in-elastic-index-and-call-an-action/296509>\
**Category:** Elasticsearch\
**Created:** [February 7, 2022, 5:51pm UTC](https://discuss.elastic.co/t/detect-update-in-elastic-index-and-call-an-action/296509 "2022-02-07T17:51:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laetitia\_RICHARD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/laetitia_richard/32/85029_2.png) [@Laetitia\_RICHARD](https://discuss.elastic.co/u/Laetitia_RICHARD)\
**Post date:** [February 7, 2022, 5:51pm UTC](https://discuss.elastic.co/t/detect-update-in-elastic-index-and-call-an-action/296509/1 "2022-02-07T17:51:42Z")

</div>

Hello, I'd like to detect updates in my index (updated, created or deleted document) and call an Amazon API Gateway. First, I thought about using Watcher but it seems that I can't detect real time modifications in my index. Then, I thought about using a Logstash instance with 2 output : an elastic output and an http output. Would you have a best suggestion for this use case ?  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 7, 2022, 6:19pm UTC](https://discuss.elastic.co/t/detect-update-in-elastic-index-and-call-an-action/296509/2 "2022-02-07T18:19:30Z")

</div>

I'd probably add a 3rd party layer in the middle like a Message Queue system.  
Then you can indeed use Logstash to read the queue and output to Elasticsearch and to your system.

Another solution, very hacky, would be to create an ingest pipeline which can call the web service you want.  
But lot of code to write, deal with security manager, and maintain it...

---

<div class="post-metadata">

**Author:** ![Laetitia\_RICHARD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/laetitia_richard/32/85029_2.png) [@Laetitia\_RICHARD](https://discuss.elastic.co/u/Laetitia_RICHARD)\
**Post date:** [February 8, 2022, 8:04am UTC](https://discuss.elastic.co/t/detect-update-in-elastic-index-and-call-an-action/296509/3 "2022-02-08T08:04:38Z")

</div>

Hi David 🙂 Thank you very much for your answer. Indeed, I think I will make two pipelines with two message queue services : one for creation and modification and another for deletions.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 8, 2022, 8:05am UTC](https://discuss.elastic.co/t/detect-update-in-elastic-index-and-call-an-action/296509/4 "2022-03-08T08:05:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
