Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[alerter]optimize: Append not resolved alert description to resolved alert #2598

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2246988
[alerter]optimize: Append not resolved alert description to resolved …
loong95 Aug 24, 2024
a19ea08
Merge branch 'master' into optimize-content-of-recovered-alert
yuluo-yx Aug 25, 2024
2713b52
Merge branch 'master' into optimize-content-of-recovered-alert
yuluo-yx Aug 26, 2024
9c8242e
Merge branch 'master' into optimize-content-of-recovered-alert
yuluo-yx Aug 26, 2024
bc78343
Merge branch 'master' into optimize-content-of-recovered-alert
yuluo-yx Aug 27, 2024
2056da8
Merge branch 'master' into optimize-content-of-recovered-alert
yuluo-yx Aug 27, 2024
c869343
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Aug 31, 2024
86cc2e2
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Aug 31, 2024
e22d8a7
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 2, 2024
5c491e8
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 3, 2024
b999d44
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 3, 2024
86f0344
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 3, 2024
3c450c5
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 4, 2024
8f19f48
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 4, 2024
187b931
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 4, 2024
30b2fe4
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 5, 2024
973f27d
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 6, 2024
cbc85d3
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 7, 2024
60008ac
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 8, 2024
75c45b2
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 8, 2024
d58a536
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 9, 2024
c32dfc1
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 9, 2024
321bb10
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 10, 2024
3c2c8bd
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 12, 2024
e2baaa8
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 13, 2024
144ef74
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 13, 2024
64ac5d3
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 15, 2024
3a0e2ac
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 15, 2024
d67661c
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 17, 2024
db84f30
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 19, 2024
f6b8981
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 21, 2024
6ff9b13
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 23, 2024
2f82da1
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 24, 2024
6396830
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 25, 2024
e58a7b0
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Sep 30, 2024
5ab9948
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Oct 16, 2024
3367119
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Oct 26, 2024
8d46a94
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Oct 26, 2024
21fc2ef
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Oct 27, 2024
71068b7
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Oct 29, 2024
7276bae
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Oct 29, 2024
f093aea
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Oct 31, 2024
bed0b1c
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Nov 1, 2024
4e3c675
Merge branch 'master' into optimize-content-of-recovered-alert
Aias00 Nov 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private void calculate(CollectRep.MetricsData metricsData) {
String alarmKey = String.valueOf(monitorId) + define.getId();
triggeredAlertMap.remove(alarmKey);
if (define.isRecoverNotice()) {
handleRecoveredAlert(currentTimeMilli, define, expr, alarmKey);
handleRecoveredAlert(currentTimeMilli, define, alarmKey);
}
}
} catch (Exception e) {
Expand Down Expand Up @@ -234,7 +234,7 @@ private void calculate(CollectRep.MetricsData metricsData) {
String alarmKey = String.valueOf(monitorId) + define.getId() + tagBuilder;
triggeredAlertMap.remove(alarmKey);
if (define.isRecoverNotice()) {
handleRecoveredAlert(currentTimeMilli, define, expr, alarmKey);
handleRecoveredAlert(currentTimeMilli, define, alarmKey);
}
}
} catch (Exception e) {
Expand All @@ -246,12 +246,12 @@ private void calculate(CollectRep.MetricsData metricsData) {
}
}

private void handleRecoveredAlert(long currentTimeMilli, AlertDefine define, String expr, String alarmKey) {
private void handleRecoveredAlert(long currentTimeMilli, AlertDefine define, String alarmKey) {
Alert notResolvedAlert = notRecoveredAlertMap.remove(alarmKey);
if (notResolvedAlert != null) {
// Sending an alarm Restore
Map<String, String> tags = notResolvedAlert.getTags();
String content = this.bundle.getString("alerter.alarm.recover") + " : " + expr;
String content = this.bundle.getString("alerter.alarm.recover") + " : " + notResolvedAlert.getContent();
Alert resumeAlert = Alert.builder()
.tags(tags)
.target(define.getApp() + "." + define.getMetric() + "." + define.getField())
Expand Down
Loading