# Is it possible to trigger an alert when a new index is created

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-trigger-an-alert-when-a-new-index-is-created/321605>\
**Category:** Elasticsearch\
**Created:** [December 20, 2022, 2:53am UTC](https://discuss.elastic.co/t/is-it-possible-to-trigger-an-alert-when-a-new-index-is-created/321605 "2022-12-20T02:53:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna\_Teja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishna_teja/32/104976_2.png) [@Krishna\_Teja](https://discuss.elastic.co/u/Krishna_Teja)\
**Post date:** [December 20, 2022, 2:53am UTC](https://discuss.elastic.co/t/is-it-possible-to-trigger-an-alert-when-a-new-index-is-created/321605/1 "2022-12-20T02:53:19Z")

</div>

I have an ILM which creates indices every 10 days for a datastream. I need to update the mapping for the newly created index on creation.

Is it possible to get an alert or trigger a webhook once a new index is created?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 20, 2022, 2:54am UTC](https://discuss.elastic.co/t/is-it-possible-to-trigger-an-alert-when-a-new-index-is-created/321605/2 "2022-12-20T02:54:22Z")

</div>

> [@Krishna\_Teja](#):
>
> I need to update the mapping for the newly created index on creation.

Can you elaborate more on that, why not use a template?

---

<div class="post-metadata">

**Author:** ![Krishna\_Teja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishna_teja/32/104976_2.png) [@Krishna\_Teja](https://discuss.elastic.co/u/Krishna_Teja)\
**Post date:** [December 20, 2022, 2:58am UTC](https://discuss.elastic.co/t/is-it-possible-to-trigger-an-alert-when-a-new-index-is-created/321605/3 "2022-12-20T02:58:28Z")

</div>

Hi Warkolm

I am enriching the data with a few new fields on datastream. When a new index is created based on ILM, it is has no enriched fields present.

> [@warkolm](#):
>
> why not use a template?

It is data from fleet and is managed by fleet based on multiple index and component templates. Hence did not try the option of updating the template

---

<div class="post-metadata">

**Author:** ![Krishna\_Teja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishna_teja/32/104976_2.png) [@Krishna\_Teja](https://discuss.elastic.co/u/Krishna_Teja)\
**Post date:** [December 20, 2022, 7:43pm UTC](https://discuss.elastic.co/t/is-it-possible-to-trigger-an-alert-when-a-new-index-is-created/321605/4 "2022-12-20T19:43:55Z")

</div>

I've updated all the component templates to have the mapping and it worked fine.

Thank you @warkolm.

---

<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:** [January 17, 2023, 7:44pm UTC](https://discuss.elastic.co/t/is-it-possible-to-trigger-an-alert-when-a-new-index-is-created/321605/5 "2023-01-17T19:44:47Z")

</div>

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