metadata.yaml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # yamllint disable rule:line-length
  2. ---
  3. - id: 'notify-telegram'
  4. meta:
  5. name: 'Telegram'
  6. link: 'https://telegram.org/'
  7. categories:
  8. - notify.agent
  9. icon_filename: 'telegram.svg'
  10. keywords:
  11. - Telegram
  12. overview:
  13. notification_description: |
  14. Send notifications to Telegram 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. - A bot token. To get one, contact the [@BotFather](https://t.me/BotFather) bot and send the command `/newbot` and follow the instructions. Start a conversation with your bot or invite it into a group where you want it to send messages.
  22. - The chat ID for every chat you want to send messages to. Contact the [@myidbot](https://t.me/myidbot) bot and send the `/getid` command to get your personal chat ID or invite it into a group and use the `/getgroupid` command to get the group chat ID. Group IDs start with a hyphen, supergroup IDs start with `-100`.
  23. - Alternatively, you can get the chat ID directly from the bot API. Send your bot a command in the chat you want to use, then check `https://api.telegram.org/bot{YourBotToken}/getUpdates`, eg. `https://api.telegram.org/bot111122223:7OpFlFFRzRBbrUUmIjj5HF9Ox2pYJZy5/getUpdates`
  24. - Terminal access to the Agent you wish to configure
  25. configuration:
  26. file:
  27. name: 'health_alarm_notify.conf'
  28. options:
  29. description: 'The following options can be defined for this notification'
  30. folding:
  31. title: 'Config Options'
  32. enabled: true
  33. list:
  34. - name: 'SEND_TELEGRAM'
  35. default_value: 'YES'
  36. description: "Set `SEND_TELEGRAM` to YES"
  37. required: true
  38. - name: 'TELEGRAM_BOT_TOKEN'
  39. default_value: ''
  40. description: "set `TELEGRAM_BOT_TOKEN` to your bot token."
  41. required: true
  42. - name: 'DEFAULT_RECIPIENT_TELEGRAM'
  43. default_value: ''
  44. description: "Set `DEFAULT_RECIPIENT_TELEGRAM` to the chat ID you want the alert notifications to be sent to. You can define multiple chat IDs like this: 49999333322 -1009999222255."
  45. required: true
  46. detailed_description: |
  47. All roles will default to this variable if left unconfigured.
  48. The `DEFAULT_RECIPIENT_CUSTOM` can be edited in the following entries at the bottom of the same file:
  49. ```conf
  50. role_recipients_telegram[sysadmin]="49999333324"
  51. role_recipients_telegram[domainadmin]="49999333389"
  52. role_recipients_telegram[dba]="-1009999222255"
  53. role_recipients_telegram[webmaster]="-1009999222255 49999333389"
  54. role_recipients_telegram[proxyadmin]="49999333344"
  55. role_recipients_telegram[sitemgr]="49999333876"
  56. ```
  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. # telegram (telegram.org) global notification options
  69. SEND_TELEGRAM="YES"
  70. TELEGRAM_BOT_TOKEN="111122223:7OpFlFFRzRBbrUUmIjj5HF9Ox2pYJZy5"
  71. DEFAULT_RECIPIENT_TELEGRAM="-100233335555"
  72. troubleshooting:
  73. problems:
  74. list: []