# Is there any way to run diagnostic steps against the problem in X-pack

**URL:** <https://discuss.elastic.co/t/is-there-any-way-to-run-diagnostic-steps-against-the-problem-in-x-pack/85031>\
**Category:** Elasticsearch\
**Created:** [May 9, 2017, 8:05am UTC](https://discuss.elastic.co/t/is-there-any-way-to-run-diagnostic-steps-against-the-problem-in-x-pack/85031 "2017-05-09T08:05:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pratik\_jain163](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pratik_jain163/32/93354_2.png) [@pratik\_jain163](https://discuss.elastic.co/u/pratik_jain163)\
**Post date:** [May 9, 2017, 8:05am UTC](https://discuss.elastic.co/t/is-there-any-way-to-run-diagnostic-steps-against-the-problem-in-x-pack/85031/1 "2017-05-09T08:05:25Z")

</div>

I know with X-pack we can do all kind of monitoring and altering but is there any way that we can run some diagnostic steps against the problem.

> Suppose if FS reached 86% we will get alerts but we want that as alter generates it should also run automatically our created scripts to cleanup FS.

above is simple example.

is this possible ?

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [May 12, 2017, 12:55pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-run-diagnostic-steps-against-the-problem-in-x-pack/85031/2 "2017-05-12T12:55:56Z")

</div>

There is no built-in way to do this, but what you can do is maybe have you script check the .watcher index to see if the watch action was executed or look for the email sent by watcher or by using the webhook action: [https://www.elastic.co/guide/en/x-pack/current/actions-webhook.html](https://www.elastic.co/guide/en/x-pack/current/actions-webhook.html)

---

<div class="post-metadata">

**Author:** ![pratik\_jain163](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pratik_jain163/32/93354_2.png) [@pratik\_jain163](https://discuss.elastic.co/u/pratik_jain163)\
**Post date:** [May 15, 2017, 9:00am UTC](https://discuss.elastic.co/t/is-there-any-way-to-run-diagnostic-steps-against-the-problem-in-x-pack/85031/3 "2017-05-15T09:00:22Z")

</div>

> [@Marius\_Dragomir](#):
>
> what you can do is maybe have you script check the .watcher index to see if the watch action was executed or look for the email sent by watcher or by using the webhook

Thanks Marius for answer but I want to know can we run shell scripts via webhook.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [May 15, 2017, 10:39am UTC](https://discuss.elastic.co/t/is-there-any-way-to-run-diagnostic-steps-against-the-problem-in-x-pack/85031/4 "2017-05-15T10:39:43Z")

</div>

Well, webhook sends a request to a web service. IF build your own web service and set it to run a shell script on a specific request, you could do 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:** [June 12, 2017, 10:42am UTC](https://discuss.elastic.co/t/is-there-any-way-to-run-diagnostic-steps-against-the-problem-in-x-pack/85031/5 "2017-06-12T10:42:31Z")

</div>

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