# Watcher

**URL:** https://discuss.elastic.co/t/watcher/136126
**Category:** Elasticsearch
**Tags:** elastic-stack-alerting
**Created:** [June 15, 2018, 5:14pm UTC](https://discuss.elastic.co/t/watcher/136126 "2018-06-15T17:14:27Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![sekhar1033](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@sekhar1033](https://discuss.elastic.co/u/sekhar1033)
#### Post date: [June 15, 2018, 5:14pm UTC](https://discuss.elastic.co/t/watcher/136126/1 "2018-06-15T17:14:27Z")

</div>

I have created a new watch in the kibana using UI. After that when I am clicking on watcher tab under management -\> Watcher it throws "Watcher: Error 500 Internal Server Error: An internal server error occurred". How could I rectify it. Its in production. I need help on it ASAP.

---

<div class="post-metadata">

### Author: ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)
#### Post date: [June 15, 2018, 8:16pm UTC](https://discuss.elastic.co/t/watcher/136126/2 "2018-06-15T20:16:12Z")

</div>

What version are you running?

What's the error stack trace in elasticsearch.log say?

---

<div class="post-metadata">

### Author: ![sekhar1033](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@sekhar1033](https://discuss.elastic.co/u/sekhar1033)
#### Post date: [June 15, 2018, 8:27pm UTC](https://discuss.elastic.co/t/watcher/136126/3 "2018-06-15T20:27:14Z")

</div>

I am running 6.0.0

Till this morning I am using Wathcer for creating and modifying some watcher alerts from UI and, which is working fine. After that I am trying to create new watcher using JSON file and I saved it. After that when I am trying to click on watcher is giving as "Watcher: Error 500 Internal Server Error: An internal server error occurred".

I am not sure how to get error stack trace in elasticsearch.log

---

<div class="post-metadata">

### Author: ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)
#### Post date: [June 15, 2018, 8:34pm UTC](https://discuss.elastic.co/t/watcher/136126/4 "2018-06-15T20:34:41Z")

</div>

elasticsearch.log is by default in `ES_HOME/logs` or alternatively in a different location if specified using the `path.logs` setting in `ES_HOME/config/elasticsearch.yml`

---

<div class="post-metadata">

### Author: ![sekhar1033](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@sekhar1033](https://discuss.elastic.co/u/sekhar1033)
#### Post date: [June 15, 2018, 8:41pm UTC](https://discuss.elastic.co/t/watcher/136126/5 "2018-06-15T20:41:05Z")

</div>

Yes. my path in elasticsearch.yml is defined as path.logs: /var/log/elasticsearch

How can I look for error stack trace in that, Because it is a huge file.

This is what I got "| WARN | org.elasticsearch.index.reindex.TransportDeleteByQueryAction - giving up on search because it failed with a non-retryable exception" when I use command cat elasticsearch.log | grep exception

And when I use cat elasticsearch.log | grep tomcat  
I got the following. tomcat is the index pettern that I have tried to use when I am trying to create the new watcher.  
2018-06-15T11:34:35,482 | INFO | org.elasticsearch.cluster.metadata.MetaDataCreateIndexService - [tomcat-000153] creating index, cause [rollover\_index], templates [tomcat], shards [1]/[1], mappings [doc]  
2018-06-15T11:34:36,341 | INFO | org.elasticsearch.cluster.routing.allocation.AllocationService - Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[tomcat-000153][0]] ...]).  
2018-06-15T11:34:37,572 | INFO | org.elasticsearch.cluster.metadata.MetaDataMappingService - [tomcat-000153/5m9IQ6gxRU61kz2LgaUKjw] update\_mapping [doc]

Also, How can I delete the watcher from CLI that have created earlier from UI.

---

<div class="post-metadata">

### Author: ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)
#### Post date: [June 15, 2018, 11:17pm UTC](https://discuss.elastic.co/t/watcher/136126/6 "2018-06-15T23:17:10Z")

</div>

> [@sekhar1033](#):
>
> Also, How can I delete the watcher from CLI that have created earlier from UI.

> **[Delete watch API | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html)**

---

<div class="post-metadata">

### Author: ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)
#### Post date: [June 15, 2018, 11:21pm UTC](https://discuss.elastic.co/t/watcher/136126/7 "2018-06-15T23:21:06Z")

</div>

> [@sekhar1033](#):
>
> How can I look for error stack trace in that, Because it is a huge file.

Look for the area of the logfile with the timestamps associated with when you encountered the error in the UI.

---

<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: [July 13, 2018, 11:21pm UTC](https://discuss.elastic.co/t/watcher/136126/8 "2018-07-13T23:21:12Z")

</div>

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