I'm playing with what I can do with watcher and trying to get chains working. But I get an error when trying to upload the watch:
{"error":"WatcherException[failed to put watch [chain_tester]]; nested: InputException[could not parse input for watch [chain_tester]. unknown input type [chain]]; ","status":500}
here is a sample of what I've done (it's a pointless test):
{"trigger":{
"schedule":{
"interval": "1m"
}
},
"input":{
"chain":{
"inputs": [
{
"first":{
"search":{
"request":{
"indices": ["logstash-*"],
"body":{
"query": {
"filtered": {
"query": {
"query_string": {
"query": "*"
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"gte": "now-1m",
"lte": "now"
}
}
}
],
"must_not": []
}
}
}
}
}
}
}
},
"second":{
"search":{
"request":{
"indices": [".watch_history*"],
"body":{
"query": {
"filtered": {
"query": {
"query_string": {
"query": "watch_id: chain_tester"
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"gte": "now-1m",
"lte": "now"
}
}
}
],
"must_not": []
}
}
}
}
}
}
}
}
}
]
}
},
"condition":{
"compare":{
"ctx.payload.first.hits.total":{
"gt":1200
},
"ctx.payload.second.hits.hits.0.result.condition.met":{
"eq": false
}
}
}
}
I can't see any syntax errors, so I'm guessing I might be missing something in configuration? Or we may have the wrong watcher version? (I didn't install this one and am not sure how to check the version).