# Import old watches into x-pack

**URL:** https://discuss.elastic.co/t/import-old-watches-into-x-pack/89594
**Category:** Elasticsearch
**Created:** [June 15, 2017, 4:30pm UTC](https://discuss.elastic.co/t/import-old-watches-into-x-pack/89594 "2017-06-15T16:30:31Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)
#### Post date: [June 15, 2017, 4:30pm UTC](https://discuss.elastic.co/t/import-old-watches-into-x-pack/89594/1 "2017-06-15T16:30:31Z")

</div>

I'm wondering if it is possible to import a saved .watches index. I had to reinstall elasticsearch because of a bug and I saved all of the indices on a separate instance of ES with the \_reindex command. I then reinstalled ES and reindexed the .watches index back but things don't seem to be working. I can see all of my previous watches when I search the .watches index, but when I try and \_execute them, it says they cannot be found (even though I can see them right there!).

Any idea why this would be? Can I change the default watcher index from .watches to something else?

---

<div class="post-metadata">

### Author: ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)
#### Post date: [June 15, 2017, 4:37pm UTC](https://discuss.elastic.co/t/import-old-watches-into-x-pack/89594/2 "2017-06-15T16:37:04Z")

</div>

This is the error I get:

```
[2017-06-15T12:32:17,104][ERROR][o.e.x.w.t.a.e.TransportExecuteWatchAction] [watcher] failed to execute [missingcolumn]
org.elasticsearch.ResourceNotFoundException: watch [missingcolumn] does not exist
	at org.elasticsearch.xpack.watcher.transport.actions.execute.TransportExecuteWatchAction.masterOperation(TransportExecuteWatchAction.java:107) [x-pack-5.4.0.jar:5.4.0]
	at org.elasticsearch.xpack.watcher.transport.actions.execute.TransportExecuteWatchAction.masterOperation(TransportExecuteWatchAction.java:65) [x-pack-5.4.0.jar:5.4.0]
	at org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:87) [elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$2.doRun(TransportMasterNodeAction.java:166) [elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:638) [elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.4.0.jar:5.4.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_111]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_111]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]

```

And when I search

> GET .watches/\_search  
> {"query":{"match":{"\_id":"missingcolumn"}},"size":100}

Response is:

```
"hits": {
    "total": 1,
    "max_score": 1,
    "hits": [
      {
        "_index": ".watches",
        "_type": "watch",
        "_id": "missingcolumn",
        "_score": 1,
        "_source": {
          "trigger": {
            "schedule": {
              "interval": "40m"
            }
          },
          "input": {
            "http": {
              "request": {
                 ......etc.....

```

---

<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: [June 16, 2017, 9:41am UTC](https://discuss.elastic.co/t/import-old-watches-into-x-pack/89594/3 "2017-06-16T09:41:40Z")

</div>

Hi,

before you reindex the watches, make sure you are stopping watcher. When the reindex is finished start watcher again. This generates all the required in memory data structures for watch execution.

You can also try to run a watcher restart now and it should work.

--Alex

---

<div class="post-metadata">

### Author: ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)
#### Post date: [June 20, 2017, 6:54am UTC](https://discuss.elastic.co/t/import-old-watches-into-x-pack/89594/4 "2017-06-20T06:54:59Z")

</div>

Ok, I had to manually re-add all of my watches this time but I'll try to shutdown watcher and/or do the watcher restart to make it appear if this were to happen again. Thanks Alex

---

<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 18, 2017, 6:55am UTC](https://discuss.elastic.co/t/import-old-watches-into-x-pack/89594/5 "2017-07-18T06:55:12Z")

</div>

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