設定 Proxmox 系統通知至 Discord webhook

  1. 在 Discord 建立一個文字頻道 Exp. ichiayi-proxmox → 整合 → Webhook [複製 Webhook 網址]
    1. token - 1387212345678901200/Ram12345vmkOpxxxxxxxxxxxxxxxxxxxxXT-Vxxxxxxxxxx_GDxxxxxxxxxxxxxxxx6D
  2. Datacenter → Notifications → Notification Targets → [Add] → Webhook
  3. Webhook
    1. Endpoint Name : Discord
    2. Method/URL : POST /
      https://discord.com/api/webhooks/{{ secrets.token }}
    3. Headers : [Add Header]
      1. Key :
        Content-Type
      2. Value :
        application/json
    4. Body :
      {
        "content": "**Proxmox 通知**\n```{{ escape message }}```"
      }
    5. Secrets : [Add Secret]
      1. Key :
        token
      2. Value :
        1387212345678901200/Ram12345vmkOpxxxxxxxxxxxxxxxxxxxxXT-Vxxxxxxxxxx_GDxxxxxxxxxxxxxxxx6D
  4. 進行測試
    1. 如果成功就會在 Discord 出現訊息
    2. 如果出現 Error 500 就需要檢查 Body 的內容變數是否有設定錯誤
  5. 調整 Notification Matchers(通知規則)
    1. 可以直接修改default-matcher(預設規則)加入通知 Discord
    2. 在 Targets to notify 勾選 Discord
  6. 之後如果有訊息通知 Exp. Backup 結果通知 就會在 Discord 出現訊息 Exp.

參考網址