I am scanning a time series index of logs and sending an alert every hour if an error occurred, the check is happening every min. But I would like to like to send the alerts only if the error was repeated in the last hour, meaning if it occurred one time or within a small time range then stopped then no alert should be sent . Is there a way to achieve that?
Index mapping:
{
"test-index": {
"mappings": {
"dynamic": "false",
"properties": {
"@internal": {
"properties": {
"event_lag": {
"type": "long"
}
}
},
"@timestamp": {
"type": "date"
},
"app": {
"log": {
"level": {
"type": "keyword"
},
"message": {
"type": "text"
}
}
}
}
}
}
}