# Command-line action from watcher

**URL:** https://discuss.elastic.co/t/command-line-action-from-watcher/126092
**Category:** Elasticsearch
**Tags:** elastic-stack-alerting
**Created:** [March 29, 2018, 12:44pm UTC](https://discuss.elastic.co/t/command-line-action-from-watcher/126092 "2018-03-29T12:44:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![annk](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@annk](https://discuss.elastic.co/u/annk)
#### Post date: [March 29, 2018, 12:44pm UTC](https://discuss.elastic.co/t/command-line-action-from-watcher/126092/1 "2018-03-29T12:44:13Z")

</div>

Is it possible to trigger a command-line script from watcher action ?  
We have scripts that send alert to a ticketing system , I am trying to see if there is any way t trigger this script from watcher and pass parameters ?

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [March 29, 2018, 1:03pm UTC](https://discuss.elastic.co/t/command-line-action-from-watcher/126092/2 "2018-03-29T13:03:13Z")

</div>

Because of the Java Security Manager in Elasticsearch it is not possible to spawn external processes.

You could however work around this by using a watcher webhook action, that sends data to logstash and its [http input](https://www.elastic.co/guide/en/logstash/6.2/plugins-inputs-http.html), which then executes your script using the [exec output](https://www.elastic.co/guide/en/logstash/6.2/plugins-outputs-exec.html)

Hope this helps!

---

<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: [April 26, 2018, 1:03pm UTC](https://discuss.elastic.co/t/command-line-action-from-watcher/126092/3 "2018-04-26T13:03:20Z")

</div>

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