fix: differentiate alarm task types - #1408
Conversation
LexLuthr
left a comment
There was a problem hiding this comment.
It doesn't seem to be solving the issue you are describing in the summary. Another problem is that the current behaviour is expected. Any failures should be looked at by SPs. Why did proving failed. In your case, you already knew but what if proving failed and SP finds out because of the alert?
| func taskFailureCheck(al *alerts) { | ||
| taskFailureCheckWith(al, Name_TaskFailures, FullAlertInterval, sealingTasks) | ||
| taskFailureCheckWith(al, Name_TaskFailures, FullAlertInterval, sealingTasks, func(taskName string) bool { | ||
| return !slices.Contains(pdpTasks, taskName) |
There was a problem hiding this comment.
This will basically ensure that any important task not part of the array will be ignored. That's not a good choice.
| func pdpTaskFailureCheck(al *alerts) { | ||
| taskFailureCheckWith(al, Name_PDPTaskFailures, AlertManagerInterval, pdpTasks) | ||
| taskFailureCheckWith(al, Name_PDPTaskFailures, AlertManagerInterval, pdpTasks, func(taskName string) bool { | ||
| return slices.Contains(pdpTasks, taskName) |
There was a problem hiding this comment.
This will basically ensure that any important task not part of the array will be ignored. That's not a good choice.
There was a problem hiding this comment.
There may be an inaccuracy here. But the tasks in the list all take a 5-minute route, and the rest that are not here still follow the previous 30-minute route?
|
Here is a duplicate alert, and after the problem has been resolved. He also continues to alert in TaskFailures. |
I think this change is based on an incorrect interpretation of the alert.
This PR makes the alert disappear sooner by excluding selected PDP tasks from the general 30-minute failure check. That suppresses valid failure information; it does not fix either the failures or the alert logic. It also incorrectly treats If duplicate presentation between |
|
Ah, my expectation is that when the error stops, the alarm should stop (the alarm has been going on for a period of time when the problem occurs). Otherwise, after solving the problem, the user will be confused when he finds out why there are still alarms. This is the original reason why I paid attention to this issue in the first place |
|
Your double alert observation is on point. The solution you implemented needs some fine tuning. |
|
I don't have a good idea about repetition for the time being. Maybe I just add some words to make it clearer. I'll take a look at it tomorrow. Maybe this PR is just to differentiate between duplicate alarms and make them clearer. For issues that have been resolved but still trigger alerts, I keep my opinion (preferably, if the alarm stops, then stop). <-- I don’t know how to implement this elegantly. |
|
@beck-8 There is no hurry. Take your time. Think about an approach which keeps as much of current semantics and general intent and then do a small surgical change which removes the duplication. What that entails, I leave up to you. If you need help, you can ping me on Slack and we can discuss this there in detail. |
It turns out that there is no distinction between types for the same alarm. It will occur that after the problem has been solved, the alarm will continue to be issued. This is because
TaskFailureslooks back at errors within 30 minutes.Now differentiate them.
