diff --git a/build/monitor/root/opt/yunion/share/notify_templates/monitor/content@cn/DEFAULT.email b/build/monitor/root/opt/yunion/share/notify_templates/monitor/content@cn/DEFAULT.email
index 35127eeb08..a05f63231e 100644
--- a/build/monitor/root/opt/yunion/share/notify_templates/monitor/content@cn/DEFAULT.email
+++ b/build/monitor/root/opt/yunion/share/notify_templates/monitor/content@cn/DEFAULT.email
@@ -108,6 +108,7 @@
名称 |
IP |
平台 |
+ 指标 |
触发值 |
@@ -124,7 +125,8 @@
{{ index .tags "brand" }}
|
- {{$Matche.value_str}} |
+ {{ $Matche.metric }} |
+ {{ $Matche.value_str }} |
{{end}}
diff --git a/build/monitor/root/opt/yunion/share/notify_templates/monitor/content@en/DEFAULT.email b/build/monitor/root/opt/yunion/share/notify_templates/monitor/content@en/DEFAULT.email
index 2906601ab9..251bb773d9 100644
--- a/build/monitor/root/opt/yunion/share/notify_templates/monitor/content@en/DEFAULT.email
+++ b/build/monitor/root/opt/yunion/share/notify_templates/monitor/content@en/DEFAULT.email
@@ -108,6 +108,7 @@
Name |
IP |
Brand |
+ Metric |
Trigger value |
@@ -124,7 +125,8 @@
{{ index .tags "brand" }}
|
- {{$Matche.value_str}} |
+ {{ $Matche.metric }} |
+ {{ $Matche.value_str }} |
{{end}}
diff --git a/pkg/monitor/alerting/notifiers/onecloud.go b/pkg/monitor/alerting/notifiers/onecloud.go
index 0386434dd0..7c745ff587 100644
--- a/pkg/monitor/alerting/notifiers/onecloud.go
+++ b/pkg/monitor/alerting/notifiers/onecloud.go
@@ -471,7 +471,8 @@ func (s *sendUserImpl) send() error {
}
func (s *sendUserImpl) execNotifyFunc() error {
- return notifyclient.NotifyAllWithoutRobotWithCtx(s.Ctx, s.msg.Uid, false, notify.TNotifyPriority(s.msg.Priority),
+ return notifyclient.NotifyAllWithoutRobotWithCtx(
+ s.Ctx, s.msg.Uid, false, s.msg.Priority,
"DEFAULT", jsonutils.Marshal(&s.config))
}
@@ -484,7 +485,7 @@ func (s *sendSysImpl) send() error {
}
func (s *sendSysImpl) execNotifyFunc() error {
- notifyclient.SystemNotifyWithCtx(s.Ctx, notify.TNotifyPriority(s.msg.Priority), "DEFAULT",
+ notifyclient.SystemNotifyWithCtx(s.Ctx, s.msg.Priority, "DEFAULT",
jsonutils.Marshal(&s.config))
return nil
}
@@ -499,7 +500,7 @@ func (s *sendMobileImpl) send() error {
return err
}
notifyclient.RawNotifyWithCtx(s.Ctx, s.msg.Uid, false, notify.TNotifyChannel(s.Setting.Channel),
- notify.TNotifyPriority(s.msg.Priority),
+ s.msg.Priority,
s.msg.Topic,
msgObj)
return nil
@@ -514,7 +515,7 @@ func (s *sendRobotImpl) send() error {
}
func (s *sendRobotImpl) execNotifyFunc() error {
- return notifyclient.NotifyRobotWithCtx(s.Ctx, s.msg.Robots, notify.TNotifyPriority(s.msg.Priority),
+ return notifyclient.NotifyRobotWithCtx(s.Ctx, s.msg.Robots, s.msg.Priority,
"DEFAULT", jsonutils.Marshal(&s.config))
}