Dear Team,
After searching for the monitor.status: down we wanted to add an extra output to slack to know for which host we have received it. Is that possible?
{
"trigger": {
"schedule": {
"interval": "1m"
}
},
"input": {
"search": {
"request": {
"search_type": "query_then_fetch",
"indices": [
"heartbeat-*"
],
"types": [],
"body": {
"size": 5,
"query": {
"match": {
"monitor.status": "down"
}
}
}
}
}
},
"condition": {
"compare": {
"ctx.payload.hits.total": {
"gt": 5
}
}
},
"actions": {
"notify-slack": {
"slack": {
"account": "monitor",
"message": {
"from": "watcher",
"to": [
"elk"
],
"text": "Core-Service Down:",
"attachments": [
{
"color": "danger",
"title": "Core-Service Down for customer:",
"text": ""
}
]
}
}
}
}
}