Elasticsearch 2.2.1
I am trying to update a watch, adding a "to" field to a slack action, using this as example.
This works :
"actions": {
"notify-slack": {
"slack": {
"message": {
"text": "Encountered {{ctx.payload.hits.total}} errors in the last 5 minutes"
}
}
}
}
But when I try to add the "to" field :
"actions": {
"notify-slack": {
"slack": {
"to" : [ "@bpoirson"],
"message": {
"text": "Encountered {{ctx.payload.hits.total}} errors in the last 5 minutes"
}
}
}
}
Elasticsearch returns me this :
{
"error": {
"root_cause": [
{
"type": "parse_exception",
"reason": "failed to parse [slack] action [log_error_watch_test/notify-slack]. unexpected token [START_ARRAY]"
}
],
"type": "parse_exception",
"reason": "failed to parse [slack] action [log_error_watch_test/notify-slack]. unexpected token [START_ARRAY]"
},
"status": 400
}
Any idea on what I'm doing wrong here?
Thanks