Graylog: 配置电子邮件通知

本文件是警报通知指南的一部分。您可以在这里查看完整指南:如何通过电子邮件、Slack 或 Mattermost 发送 Graylog 警报

👋 欢迎阅读 Stackhero 文档!

Stackhero 提供现成的 Graylog 云 解决方案,具有众多优势,包括:

  • 包含无限制和专用的 SMTP 电子邮件服务器
  • 只需点击即可轻松完成更新
  • 使用 HTTPS 保护的可定制域名(例如,https://logs.your-company.com)。
  • 专用私有 VM提供的最佳性能和强大安全性

节省时间简化您的生活:只需 5 分钟即可试用 Stackhero 的 Graylog 云托管 解决方案!

每个由 Stackhero 提供的 Graylog 实例都内置了邮件服务器,允许您直接从实例发送无限量电子邮件,无需额外费用。

要设置电子邮件通知,您可以按照以下步骤操作:

  1. 进入您的 Graylog 服务,导航至 Alerts > Notifications,点击 Get started! 按钮,或选择 Create notification

  2. 输入通知标题,并在 Notification type 下选择 Email Notification

  3. Sender 字段中填写 noreply@<yourGraylogDomain>。请将 <yourGraylogDomain> 替换为您的实际 Graylog 域名,通常格式为 <XXXXXX>.stackhero-network.com

    重要提示: 请务必使用您的 Graylog 域名,否则发送邮件时会出现错误。

  4. Email recipient 字段中填写您希望接收警报的电子邮件地址。

    电子邮件配置示例电子邮件配置示例

  5. 点击 Execute test notification 按钮,验证一切是否正常。确认无误后,点击 Create 完成设置。

恭喜!您的电子邮件通知现已配置并可正常使用!

如果您遇到 Error: Notification has email recipients and is triggered, but sending emails failed. Sending the email to the following server failed: postfix:25 错误,很可能是因为 sender 字段格式不正确。它应遵循 <something>@<yourGraylogDomain> 的格式。"something" 可以自定义(如 "noreply"),但 "yourGraylogDomain" 必须与您的 Graylog 服务域名一致,通常为 <XXXXXX>.stackhero-network.com