# Script alerts

**URL:** <https://discuss.elastic.co/t/script-alerts/305056>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting, painless\
**Created:** [May 18, 2022, 11:25am UTC](https://discuss.elastic.co/t/script-alerts/305056 "2022-05-18T11:25:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdaniel7](https://avatars.discourse-cdn.com/v4/letter/b/439d5e/32.png) [@bdaniel7](https://discuss.elastic.co/u/bdaniel7)\
**Post date:** [May 18, 2022, 11:25am UTC](https://discuss.elastic.co/t/script-alerts/305056/1 "2022-05-18T11:25:45Z")

</div>

Hi,

Is it possible to define alerts as Painless scripts?  
So I don't have to use the web interface on each environment where I install ELK?

---

<div class="post-metadata">

**Author:** ![Patrick\_Mueller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patrick_mueller/32/109425_2.png) [@Patrick\_Mueller](https://discuss.elastic.co/u/Patrick_Mueller)\
**Post date:** [May 18, 2022, 1:02pm UTC](https://discuss.elastic.co/t/script-alerts/305056/2 "2022-05-18T13:02:26Z")

</div>

If you're talking about Kibana alerting, then no - we do not currently have any alerting rules use Painless.

You can export rules from one Kibana to import into another though. You would then need to import them from each new Elastic stack, and also re-enable the rules, but at least you wouldn't have to re-create them from scratch.

---

<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:** [June 15, 2022, 1:02pm UTC](https://discuss.elastic.co/t/script-alerts/305056/3 "2022-06-15T13:02:39Z")

</div>

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