# Can X-Pack Watcher script conditions use other scripting languages?

**URL:** <https://discuss.elastic.co/t/can-x-pack-watcher-script-conditions-use-other-scripting-languages/139821>\
**Category:** Elasticsearch\
**Created:** [July 12, 2018, 6:59pm UTC](https://discuss.elastic.co/t/can-x-pack-watcher-script-conditions-use-other-scripting-languages/139821 "2018-07-12T18:59:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rob2](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@Rob2](https://discuss.elastic.co/u/Rob2)\
**Post date:** [July 12, 2018, 6:59pm UTC](https://discuss.elastic.co/t/can-x-pack-watcher-script-conditions-use-other-scripting-languages/139821/1 "2018-07-12T18:59:18Z")

</div>

The current documentation at [https://www.elastic.co/guide/en/x-pack/current/condition-script.html](https://www.elastic.co/guide/en/x-pack/current/condition-script.html) indicates in several places and examples that X-Pack Watcher script conditions can use other languages than "painless".

I just tried with Python and got back the error "Watcher: [illegal\_argument\_exception] script\_lang not supported [python]".

Is the current documentation wrong?

---

<div class="post-metadata">

**Author:** ![Rob2](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@Rob2](https://discuss.elastic.co/u/Rob2)\
**Post date:** [July 12, 2018, 7:05pm UTC](https://discuss.elastic.co/t/can-x-pack-watcher-script-conditions-use-other-scripting-languages/139821/2 "2018-07-12T19:05:10Z")

</div>

Looks like the above link was for X-Pack 6.2. I think the word "current" here and in the url threw me off:  
 ![2%5D%20_%20Elastic](https://us1.discourse-cdn.com/elastic/original/3X/f/3/f3d42b347eff0a56237f286568063a9af8bdf344.jpg)

This seems to be the updated doc page for 6.3:  
[https://www.elastic.co/guide/en/elastic-stack-overview/current/condition-script.html](https://www.elastic.co/guide/en/elastic-stack-overview/current/condition-script.html)

It still mentions other languages, and uses "lang": "javascript" in the example:

 ![Screenshot_2018-07-12%20Script%20Condition%20Elastic%20Stack%20Overview%20%5B6%203%5D%20Elastic](https://us1.discourse-cdn.com/elastic/original/3X/7/6/7614bc3f1e6d139ad7b09c234ebcf9840dd1211b.png)

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [July 12, 2018, 10:36pm UTC](https://discuss.elastic.co/t/can-x-pack-watcher-script-conditions-use-other-scripting-languages/139821/3 "2018-07-12T22:36:49Z")

</div>

Other languages can be used, but `python` was removed as a scripting language. You could still use a custom script engine (java plugin).

---

<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:** [August 9, 2018, 10:47pm UTC](https://discuss.elastic.co/t/can-x-pack-watcher-script-conditions-use-other-scripting-languages/139821/4 "2018-08-09T22:47:21Z")

</div>

Closed on August 9, 2018, 10:47pm UTC

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