您好,尝试在 test.yaml 文件中配置 slack 通知,出现以下错误 ERROR:root:Could not loadrule /opt/rules/test.yaml: Error initiatingalert ['slack', {'slack_webhook_url': ' https:// hooks.slack.com/servichttps://hooks.slack.com/services/abcd '}]:无法导入模块 slack_webhook_url:需要超过 1 个值才能解压警报:“slack”slack_webhook_url:“ https://hooks。 slack.com/servichttps://hooks.slack.com/services/abcd “这是定义松弛警报的正确方法吗
确保正确遵循空格并提供所有必需的参数:
alert:
- "slack"
slack:
slack_webhook_url: "YOUR URL"
Run Code Online (Sandbox Code Playgroud)
它应该有效。