# Watchers are not working after elasticsearch migration 7.16.1 to 8.5.1

**URL:** <https://discuss.elastic.co/t/watchers-are-not-working-after-elasticsearch-migration-7-16-1-to-8-5-1/328733>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [March 28, 2023, 3:54pm UTC](https://discuss.elastic.co/t/watchers-are-not-working-after-elasticsearch-migration-7-16-1-to-8-5-1/328733 "2023-03-28T15:54:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkaymak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mkaymak/32/119070_2.png) [@mkaymak](https://discuss.elastic.co/u/mkaymak)\
**Post date:** [March 28, 2023, 3:54pm UTC](https://discuss.elastic.co/t/watchers-are-not-working-after-elasticsearch-migration-7-16-1-to-8-5-1/328733/1 "2023-03-28T15:54:22Z")

</div>

After migrating Elasticsearch version 7.16.1 to 8.5.1  
The watchers which basically find the error logs and send them to our messaging channel started to not working.  
When I simulate my watcher the error message is:

```auto
 "error": {
        "root_cause": [
          {
            "type": "null_pointer_exception",
            "reason": "Cannot invoke \"org.elasticsearch.xpack.core.watcher.watch.Payload.data()\" because the return value of \"org.elasticsearch.xpack.core.watcher.input.Input$Result.payload()\" is null"
          }
        ],
        "type": "null_pointer_exception",
        "reason": "Cannot invoke \"org.elasticsearch.xpack.core.watcher.watch.Payload.data()\" because the return value of \"org.elasticsearch.xpack.core.watcher.input.Input$Result.payload()\" is null"
      },

```

I tried to see the results of some variables by

```auto
Debug.explain()

```

but it seems that I cannot see them when I simulate the watcher from Kibana UI, as well as by executing it like this

```auto
POST _watcher/watch/my_watcher/_execute

```

Do you have any suggestions to migrate watchers to version 8?  
Also debugging the result of some variables?  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![Wave](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wave/32/117242_2.png) [@Wave](https://discuss.elastic.co/u/Wave)\
**Post date:** [April 2, 2023, 2:57am UTC](https://discuss.elastic.co/t/watchers-are-not-working-after-elasticsearch-migration-7-16-1-to-8-5-1/328733/2 "2023-04-02T02:57:59Z")

</div>

Hi @mkaymak,

Would you be able be share an example of the watcher in question making sure to redact any confidential information please?

---

<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 30, 2023, 2:58am UTC](https://discuss.elastic.co/t/watchers-are-not-working-after-elasticsearch-migration-7-16-1-to-8-5-1/328733/3 "2023-04-30T02:58:42Z")

</div>

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