Hi!
I want this watcher to send me an email when they find the code 0, but I'm not receiving any emails. I was told that the email is configured on elastic.yml. Maybe Imm doing something wrong.
Could you help me, please? Thanks!
{
"trigger": {
"schedule": {
"interval": "1m"
}
},
"input": {
"search": {
"request": {
"search_type": "query_then_fetch",
"indices": [
"index*"
],
"rest_total_hits_as_int": true,
"body": {
"size": 0,
"query": {
"match": {
"code": "0"
}
}
}
},
"extract": [
"code"
]
}
},
"condition": {
"compare": {
"ctx.payload.hits.total": {
"gte": 1
}
}
},
"actions": {
"reminder_email": {
"email": {
"profile": "standard",
"to": [
"email@email.com"
],
"subject": "Test",
"body": {
"text": "Timeouts {{ctx.payload.hits.total}}"
}
}
}
}
}```