在Spinnaker中配置Slack警报

问题描述 投票:0回答:1

当大三角帆管道出现故障时,我们可以看到以下内容:

Spinnaker Alerts Bot APP [3:24 PM]
Stage failed for APP_NAME
Stage STAGE_NAME for APP_NAME's PIPELINE_NAME has failed

OTHER STUFF FROM NOTIFICATION CONFIG PANEL OF STAGE

Spinnaker   Today at 3:24 PM

配置“OTHER STUFF”很容易,但是前三行怎么样,可能在服务器上的配置文件中没有在Spinnaker UI中找到这样做的地方呢?

slack spinnaker
1个回答
1
投票

它没有记录,但如果你编辑通知的JSON,你可以添加一个customMessage字段,这将覆盖默认的三行消息。

例如,将阶段JSON中的notifications字段更改为:

"notifications": [
    {
      "address": "my-slack-channel",
      "customMessage": "this will replace all three of the standard message lines, and can contain HTML",
      "level": "stage",
      "type": "slack",
      "when": [
        "stage.failed"
      ]
    }
  ]

你会看到:

Spinnaker Alerts Bot APP [3:24 PM]
this will replace all three of the standard message lines, and can contain HTML

Spinnaker   Today at 3:24 PM
© www.soinside.com 2019 - 2024. All rights reserved.