metadata.yaml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # yamllint disable rule:line-length
  2. ---
  3. - id: 'notify-discord'
  4. meta:
  5. name: 'Discord'
  6. link: 'https://discord.com/'
  7. categories:
  8. - notify.agent
  9. icon_filename: 'discord.png'
  10. keywords:
  11. - Discord
  12. overview:
  13. notification_description: |
  14. Send notifications to Discord using Netdata's Agent alert notification feature, which supports dozens of endpoints, user roles, and more.
  15. notification_limitations: ''
  16. setup:
  17. prerequisites:
  18. list:
  19. - title: ''
  20. description: |
  21. - The incoming webhook URL as given by Discord. Create a webhook by following the official [Discord documentation](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks). You can use the same on all your Netdata servers (or you can have multiple if you like - your decision).
  22. - One or more Discord channels to post the messages to
  23. - Access to the terminal where Netdata Agent is running
  24. configuration:
  25. file:
  26. name: 'health_alarm_notify.conf'
  27. options:
  28. description: 'The following options can be defined for this notification'
  29. folding:
  30. title: 'Config Options'
  31. enabled: true
  32. list:
  33. - name: 'SEND_DISCORD'
  34. default_value: 'YES'
  35. description: "Set `SEND_DISCORD` to YES"
  36. required: true
  37. - name: 'DISCORD_WEBHOOK_URL'
  38. default_value: ''
  39. description: "set `DISCORD_WEBHOOK_URL` to your webhook URL."
  40. required: true
  41. - name: 'DEFAULT_RECIPIENT_DISCORD'
  42. default_value: ''
  43. description: "Set `DEFAULT_RECIPIENT_DISCORD` to the channel you want the alert notifications to be sent to. You can define multiple channels like this: `alerts` `systems`. "
  44. required: true
  45. detailed_description: |
  46. All roles will default to this variable if left unconfigured.
  47. You can then have different channels per role, by editing `DEFAULT_RECIPIENT_DISCORD` with the channel you want, in the following entries at the bottom of the same file:
  48. ```conf
  49. role_recipients_discord[sysadmin]="systems"
  50. role_recipients_discord[domainadmin]="domains"
  51. role_recipients_discord[dba]="databases systems"
  52. role_recipients_discord[webmaster]="marketing development"
  53. role_recipients_discord[proxyadmin]="proxy-admin"
  54. role_recipients_discord[sitemgr]="sites"
  55. ```
  56. The values you provide should already exist as Discord channels in your server.
  57. examples:
  58. folding:
  59. enabled: true
  60. title: ''
  61. list:
  62. - name: 'Basic Configuration'
  63. folding:
  64. enabled: false
  65. description: ''
  66. config: |
  67. #------------------------------------------------------------------------------
  68. # discord (discordapp.com) global notification options
  69. SEND_DISCORD="YES"
  70. DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/XXXXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  71. DEFAULT_RECIPIENT_DISCORD="alerts"
  72. troubleshooting:
  73. problems:
  74. list: []