diff --git a/ruoyi-extend/ruoyi-monitor-admin/src/main/java/org/dromara/monitor/admin/notifier/InfoNotifier.java b/ruoyi-extend/ruoyi-monitor-admin/src/main/java/org/dromara/monitor/admin/notifier/InfoNotifier.java index f53a1bb6d..d4e7232bd 100644 --- a/ruoyi-extend/ruoyi-monitor-admin/src/main/java/org/dromara/monitor/admin/notifier/InfoNotifier.java +++ b/ruoyi-extend/ruoyi-monitor-admin/src/main/java/org/dromara/monitor/admin/notifier/InfoNotifier.java @@ -93,11 +93,7 @@ public class InfoNotifier { if (webHook.getEnabled()) { String title = notifier.getRegistName() + notifier.getStatusName(); String message = StringUtils.format(webHook.getTemplate(), title, notifier.getRegistName(), - notifier.getInstanceId(), notifier.getStatus(), notifier.getServiceUrl(), DateUtils.getTime()); - if (StringUtils.isNotBlank(webHook.getKeywords())) { - //追加关键词到标题中 - title += "——" + webHook.getKeywords(); - } + notifier.getInstanceId(), notifier.getStatusName(), notifier.getStatus(), notifier.getServiceUrl(), DateUtils.getTime()); try { sendWebHookMessage(webHook, title, message); log.info("WebHook消息已发送至: {}", webHook.getUrl()); diff --git a/ruoyi-extend/ruoyi-monitor-admin/src/main/resources/application.yml b/ruoyi-extend/ruoyi-monitor-admin/src/main/resources/application.yml index 832338102..66f293282 100644 --- a/ruoyi-extend/ruoyi-monitor-admin/src/main/resources/application.yml +++ b/ruoyi-extend/ruoyi-monitor-admin/src/main/resources/application.yml @@ -76,21 +76,21 @@ notify: to: subject: 系统通知 template: " -

服务名: {} ({})

-

状态: {} ({})

-

服务IP: {}

-

时间: {}

- " +

服务名称: {}

+

实例编号: {}

+

服务状态: {}({})

+

服务地址: {}

+

发送时间: {}

+ " web-hook: - enabled: false - type: 0 - url: - secret: - keywords: + enabled: true + type: 2 + secret: SEC4d035df24951f00445ea16022f0db2d442fdc83b34c6ebe15a427572264f6798 + url: https://oapi.dingtalk.com/robot/send?access_token=81a122dbbfbcbe237acdd9e20e421059fc2e0d80bf83ded4099b0fef9f9800ef template: | - #### **{}通知** - - **服务名**: {} - - **实例ID**: {} - - **状态**: {} - - **服务IP**: {} - - **时间**: {} + #### **{}** + - **服务名称**: {} + - **实例编号**: {} + - **服务状态**: {}({}) + - **服务地址**: {} + - **发送时间**: {}