I have the following watch
{
"trigger" : {
"schedule" : {
"interval" : "5m"
}
},
"input" : {
"search" : {
"request" : {
"search_type": "query_then_fetch",
"indices" : [ "<logstash-{now/d}>"],
"types" : [ "alerts" ],
"body" : {
"sort" : {
"@timestamp" : {"order" : "desc"}
},
"query" : {
"bool" : {
"must": {
"match": {
"name": "Info/Alert.A"
}
},
"filter": {
"range": {
"@timestamp": {
"gte": "now-5m"
}
}
}
}
}
}
}
}
},
"condition" : {
"compare" : {
"ctx.payload.hits.total" : {
"gt" : 0
}
}
},
"actions" : {
"notify-slack" : {
"throttle_period" : "5m",
"slack" : {
"account" : "alert",
"message" : {
"to" : [ "#watcher-alert" ],
"text" : "There is an alert!"
}
}
}
}
}
The watch works, but checking the watcher history, it returns results similar to the term I want to match ("Info/Alert.A"), for example, "Info/Failure!4r" o "Info/Heavy.Root". Why can this be happening or which approach can I take (how can I use wildcards on a Watcher query)?