{
"triggers":[
{
"trigger":{
"id": "marketing-scenario",
"name": "Marketing Scenario",
"description": "Detect when a customer buys several items in a short period of time",
"severity": "HIGH",
"enabled": true,
"actions":[
{
"actionPlugin": "email",
"actionId": "notify-to-marketing"
}
],
"tags":{
"HawkularExtension":"EventsAggregation"
}
},
"conditions":[
{
"triggerMode": "FIRING",
"type": "EXTERNAL",
"alerterId":"EventsAggregation",
"dataId": "marketing",
"expression": "event:groupBy(context.accountId):window(time,10s):having(count > 2)"
}
]
}
],
"actions":[
{
"actionPlugin": "email",
"actionId": "notify-to-marketing",
"properties": {
"to": "marketing@hawkular.org"
}
}
]
}