Hi,
I am using 6.5 GA stack. I use heartbeat to ping to 3 hosts like hosts: ["192.168.0.1:9092","192.168.0.2:9093","192.168.0.3:9094"]
and push them to heartbeat index. Mapping can be found at http://freetexthost.com/ddx5am0udp because it is lengthy
I am trying out "features" to check if its worth buying a license, and dont know if it can satisfy my use case. I would like to know, if it is possible to send alert based on my conditions;
- monitor.status =
down
- Watcher should run on every 2 minutes
- If count for any of the
hosts
is>=
3, then email alert should come
Somebody kindly help me to write query
part of the rule? Below is my current config;
"body": {
"query": {
"bool": {
"filter": {
"range": {
"@timestamp": {
"gte": "now-30s/s",
"lte": "now/s",
"format": "epoch_millis"
}
}
},
"must": {
"match": {
"monitor.status": "down"
}
}
}
},
"size": 0,
"aggs": {
"termAgg": {
"terms": {
"field": "monitor.host"
}
}
}
}
Thanks