Skip to content

Commit

Permalink
bugfix old version monitor alert has no monitor name (#1278)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsun28 committed Oct 10, 2023
1 parent 6d495a4 commit f1b7163
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ public void store(Alert alert) {
long monitorId = Long.parseLong(monitorIdStr);
Monitor monitor = monitorService.getMonitor(monitorId);
if (monitor == null) {
log.warn("Dispatch alarm the monitorId: {} not existed, ignored.", monitorId);
log.warn("Dispatch alarm the monitorId: {} not existed, ignored. target: {}.", monitorId, alert.getTarget());
return;
}
if (!tags.containsKey(CommonConstants.TAG_MONITOR_NAME)) {
tags.put(CommonConstants.TAG_MONITOR_NAME, monitor.getName());
}
if (monitor.getStatus() == CommonConstants.UN_MANAGE_CODE) {
// When monitoring is not managed, ignore and silence its alarm messages
// 当监控未管理时 忽略静默其告警信息
Expand Down

0 comments on commit f1b7163

Please sign in to comment.