Hi all,
I was wondering if it's possible to have multiple conditions in one watch and whether its possible to limit throttling to 1 alert per day/week/month.
Conditions:
I'm checking for data usage. If usage is over a certain value I want to generate an email alert. However I want to set alert at 3 different intervals, lets say 10GB, 20GB and 50GB.
Is this possible?
Throttling:
Taking the above example, I want generate only one alert per value per month as the usage counter will reset every month so there is no point in generating more than one alert (support won't like that either).
Is this possible?
Actions:
Again taking the above case, for each alert I want to send an email but I might want to have three different emails ranging from be careful to better turn off you device until support contact you.
Is this possible?
My watch
{
"trigger": {
"schedule": {
"interval": "30m"
}
},
"input": {
"search": {
"request": {
"indices": [ "netflow-*" ],
"types": "netflow",
"body": {
"query": {
"bool": {
"must" : {
"match": {
"host": "1.1.1.1"
}
},
"filter": {
"range" : {
"@timestamp": {
"gte": "now-1M/M",
"lte": "now"
}
}
}
}
},
"aggs" : {
"total" : { "sum" : { "field" : "netflow.in_bytes"} }
},
"size": 0
}
}
}
},
"condition": {
"compare": {
"ctx.payload.aggregations.total.value": {
"gte": 1073741824
}
}
},
"actions": {
"my-logging-action": {
"logging": {
"text": "Limit exceeded."
}
}
}
}