# Is possible to listen index changes?

**URL:** <https://discuss.elastic.co/t/is-possible-to-listen-index-changes/289988>\
**Category:** Elasticsearch\
**Created:** [November 23, 2021, 8:47pm UTC](https://discuss.elastic.co/t/is-possible-to-listen-index-changes/289988 "2021-11-23T20:47:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thewasta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thewasta/32/48818_2.png) [@thewasta](https://discuss.elastic.co/u/thewasta)\
**Post date:** [November 23, 2021, 8:47pm UTC](https://discuss.elastic.co/t/is-possible-to-listen-index-changes/289988/1 "2021-11-23T20:47:11Z")

</div>

I need to 'listen' for changes on my index, at first I started by writing a script in nodejs which is executed every 5min. For now I think it works... But can I do it in realtime? When a new document is insert or update.

I have read about `watchers`, but it's same than my actual script. Any advice or alternative to do it?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [November 23, 2021, 9:13pm UTC](https://discuss.elastic.co/t/is-possible-to-listen-index-changes/289988/2 "2021-11-23T21:13:15Z")

</div>

Hi @thewasta

Today there is no "listener" or "observer" mechanism to alert on new documents inserted into an index in Elasticsearch.

Both [watcher](https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-alerting.html) (legacy) and the new [Kibana Alerting Framework](https://www.elastic.co/guide/en/kibana/current/alerting-getting-started.html) are poll based mechanisms

---

<div class="post-metadata">

**Author:** ![BenB196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benb196/32/83401_2.png) [@BenB196](https://discuss.elastic.co/u/BenB196)\
**Post date:** [November 24, 2021, 1:25am UTC](https://discuss.elastic.co/t/is-possible-to-listen-index-changes/289988/3 "2021-11-24T01:25:31Z")

</div>

Just an FYI, [this](https://github.com/elastic/elasticsearch/issues/1242) is the current feature request for this. In case you want to track it.

---

<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:** [December 22, 2021, 1:26am UTC](https://discuss.elastic.co/t/is-possible-to-listen-index-changes/289988/4 "2021-12-22T01:26:20Z")

</div>

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