Hi Alexander,
Sorry for not keeping the indentation.
The watcher is the same, and i put email for the action. However as you say, there's no action which is weird.
I'm using Inline watch execution to debug watcher.
I used this watch, and notice that i put an action. However, in the response there's no answer.
curl -XPOST 'localhost:9200/_watcher/watch/_execute?pretty' -d '{
"watch" : {
"trigger" : {
"schedule" : {
"interval" : "30s"
}
},
"input" : {
"search" : {
"request" : {
"indices" : "logs",
"body" : {
"query": {
"filtered": {
"query" : {
"match" : { "message" : "error" }
}
}
}
}
}
}
}
}
},
"condition" : {
"compare" : { "ctx.payload.hits.total" : { "gt" : 5 }}
},
"actions" : {
"email_administrator" : {
"throttle_period": "5m",
"email" : {
"to" : "miemail",
"subject" : "{{ctx.payload.hits.total}} errors",
"body" : "bla bla bla",
"attach_data" : true,
"priority" : "high"
}
}
}
}'