Compatibility issues in Watcher?

PUT _watcher/watch/my-watch
{
"trigger" : {
"schedule" : { "cron" : "0 0/1 * * * ?" }
},
"input" : {
"search" : {
"request" : {
"indices" : [
"httpd*"
],
"body" : {
"query" : {
"filtered": {
"query": {
"match": { "response": 404 }
},
"filter": {
"range": {
"@timestamp" : {
"from": "{{ctx.trigger.scheduled_time}}||-5m",
"to": "{{ctx.trigger.triggered_time}}"
}
}
}
}
}
}
}
}
},
"condition" : {
"script" : "ctx.payload.hits.total > 1"
},
"actions" : {
"email_admin" : {
"email" : {
"to" : "kartik.unix@gmail.com",
"subject" : "404 recently encountered"
}
}
}
}'

{
"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 [ctx.payload.hits.total > 1] 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 [ctx.payload.hits.total > 1] of type [groovy]"
},
"status": 500
}

Allright this issue was resolved via:

Please put more information and effort in your posts.
Simply having a vague subject and then unformatted code with no explanation of what you are asking for is a guaranteed way to not get any assistance from the community.