Skip to main content
Panguard 把安全警報送到你團隊已經在用的頻道。這篇指南帶你設定 5 種通知頻道,並用角色控制誰收到什麼。
1

初始化通知設定

跑互動式設定精靈:
panguard chat setup
精靈會引導你選頻道、輸入憑證。你也可以用下面的 flag 個別設定。
2

設定通知頻道

設定一個或多個頻道:
  1. 在 Telegram 找 @BotFather 建立一個新 bot
  2. 複製 bot token
  3. 跟你的 bot 開對話,隨便傳一則訊息
  4. 透過 Telegram API 或 @userinfobot 取得 chat ID
panguard chat setup --channel telegram \
  --telegram-token "123456:ABC-DEF..." \
  --telegram-chat-id "-1001234567890"
群組通知的話,把 bot 加進 Telegram 群組,用群組的 chat ID(開頭是 -100)。
3

設定使用者角色

Panguard 有 3 種角色控制通知的詳細程度:
角色收到什麼適合誰
developer所有嚴重程度,完整技術細節工程師、DevOps
boss只有 CRITICAL 和 HIGH,白話摘要主管、管理層
it_admin所有嚴重程度,中等細節,附行動項目IT 維運
幫每個頻道指定角色:
panguard chat setup --channel telegram --role developer
panguard chat setup --channel email --role boss
panguard chat setup --channel slack --role it_admin
同一個頻道類型可以設定多次、用不同角色。例如 developer 等級的警報送 #security-engineering,boss 等級的摘要送 #security-executive
4

測試設定

送測試通知到所有已設定的頻道:
panguard chat test
  PANGUARD AI - Chat Test

  Sending test notification...

  Telegram   ... sent
  Slack      ... sent
  Email      ... sent

  All channels verified.
測試特定頻道:
panguard chat test --channel slack
5

確認啟用的頻道

列出所有通知頻道和狀態:
panguard chat status
  PANGUARD AI - Chat Status

  -- Channels -------------------------------

  Telegram   Active   role: developer   last sent: 2m ago
  Slack      Active   role: it_admin    last sent: 15m ago
  Email      Active   role: boss        last sent: 1h ago

  3 channels configured, 3 active.

下一步

設定即時防護

通知需要 Guard 在跑。先啟動持續監控。

通知系統參考

通知系統的完整文件。

使用者角色詳解

每種角色收到的內容和訊息格式說明。

通知疑難排解

頻道設定和寄送的常見問題。