fatigue feature helps suppress alerts that are repeated within a certain time frame., but we are seeing some different behavior in fatigue enabled sensu checks
fatigue setting in sensu check configuration
- occurrences": “3”,
- interval": “1200”,
- allow_resolution": “false”
Expected behavior based on above setting if sensu check failed continuously, expected alert rase in 3rd failure and wait for 20 min and see check got fixed or not if check still failing raise alert every 20 min
here issue is for example fatigue enabled check failed 1st time and issue fixed in 2nd execution check got pass sending resolved alert without sending any critical alert
Filter created :
{
“type”: “EventFilter”,
“api_version”: “core/v2”,
“metadata”: {
“name”: “fatique-resolve-alert-filter”,
“namespace”: “default”
},
“spec”: {
“action”: “allow”,
“expressions”: [
“event.check.status == 0 && event.check.history.slice(-parseInt(event.check.metadata.annotations[‘fatigue_check/occurrences’])).filter(h => h.status == 2).length >= parseInt(event.check.metadata.annotations[‘fatigue_check/occurrences’])”
],
“runtime_assets”:
}
}
But it seems like sensu doesnt support slice filter functions
I need it to be dynamically check all the n entries from the number of occurrences