Im also receiving the same error when attempting to setup a new watch.
{
"error": {
"root_cause": [
{
"type": "script_exception",
"reason": "failed to compile script [ScriptException[scripts of type [inline], operation [elasticsearch-watcher_watch] and lang [groovy] are disabled]] with lang [if (ctx.payload.aggregations.minutes.buckets.size() == 0) return false; def latest = ctx.payload.aggregations.minutes.buckets[-1]; def node = latest.nodes.buckets[0]; return node && node.memory && node.memory.value >= 75;] of type [groovy]"
}
],
"type": "script_exception",
"reason": "failed to compile script [ScriptException[scripts of type [inline], operation [elasticsearch-watcher_watch] and lang [groovy] are disabled]] with lang [if (ctx.payload.aggregations.minutes.buckets.size() == 0) return false; def latest = ctx.payload.aggregations.minutes.buckets[-1]; def node = latest.nodes.buckets[0]; return node && node.memory && node.memory.value >= 75;] of type [groovy]"
},
"status": 500
}
Reference: https://www.elastic.co/guide/en/watcher/current/watching-marvel-data.html#watching-memory-usage
Any help would be grateful.