-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Closed as not planned
Labels
:Data Management/Watcher>bugTeam:Data ManagementMeta label for data/management teamMeta label for data/management teamhelp wantedadoptmeadoptme
Description
Original comment by @spinscale:
Putting a watch with invalid JSON does not return an error and puts a broken watch into the system. The Watch parser seems to have an issue here - which should throw an exception but does not.
Putting the below watch results in a watch stored without condition and actions.. you can use the execution watch API to see that an always
condition is used and the actions array is empty.
curl -XPUT localhost:9200/_xpack/watcher/watch/1 -d '
{
"trigger": {
"schedule": {
"interval": "10s"
}
},
"input": {
"simple": {}
}},
"condition": {
"script": {
"inline": "return false"
}
},
"actions": {
"logging": {
"logging": {
"text": "{{ctx.payload}}"
}
}
}
}'
This issue happens on 2.x as well as 5.x
Originating issue was in the forum https://discuss.elastic.co/t/mistake-on-configuring-watches/70943/5
Metadata
Metadata
Assignees
Labels
:Data Management/Watcher>bugTeam:Data ManagementMeta label for data/management teamMeta label for data/management teamhelp wantedadoptmeadoptme