Watchers are not working after elasticsearch migration 7.16.1 to 8.5.1

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:

 "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

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

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

Hi @mkaymak,

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

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