metadata.yaml 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # yamllint disable rule:line-length
  2. ---
  3. - id: 'notify-matrix'
  4. meta:
  5. name: 'Matrix'
  6. link: 'https://spec.matrix.org/unstable/push-gateway-api/'
  7. categories:
  8. - notify.agent
  9. icon_filename: 'matrix.svg'
  10. keywords:
  11. - Matrix
  12. overview:
  13. notification_description: |
  14. Send notifications to Matrix network rooms 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 url of the homeserver (`https://homeserver:port`).
  22. - Credentials for connecting to the homeserver, in the form of a valid access token for your account (or for a dedicated notification account). These tokens usually don't expire.
  23. - The room ids that you want to sent the notification to.
  24. - Access to the terminal where Netdata Agent is running
  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_MATRIX'
  35. default_value: 'YES'
  36. description: "Set `SEND_MATRIX` to YES"
  37. required: true
  38. - name: 'MATRIX_HOMESERVER'
  39. default_value: ''
  40. description: "set `MATRIX_HOMESERVER` to the URL of the Matrix homeserver."
  41. required: true
  42. - name: 'MATRIX_ACCESSTOKEN'
  43. default_value: ''
  44. description: "Set `MATRIX_ACCESSTOKEN` to the access token from your Matrix account."
  45. required: true
  46. detailed_description: |
  47. To obtain the access token, you can use the following curl command:
  48. ```
  49. curl -XPOST -d '{"type":"m.login.password", "user":"example", "password":"wordpass"}' "https://homeserver:8448/_matrix/client/r0/login"
  50. ```
  51. - name: 'DEFAULT_RECIPIENT_MATRIX'
  52. default_value: ''
  53. description: "Set `DEFAULT_RECIPIENT_MATRIX` to the rooms you want the alert notifications to be sent to. The format is `!roomid:homeservername`."
  54. required: true
  55. detailed_description: |
  56. The room ids are unique identifiers and can be obtained from the room settings in a Matrix client (e.g. Riot).
  57. You can define multiple rooms like this: `!roomid1:homeservername` `!roomid2:homeservername`.
  58. All roles will default to this variable if left unconfigured.
  59. You can have different rooms per role, by editing `DEFAULT_RECIPIENT_MATRIX` with the `!roomid:homeservername` you want, in the following entries at the bottom of the same file:
  60. ```conf
  61. role_recipients_matrix[sysadmin]="!roomid1:homeservername"
  62. role_recipients_matrix[domainadmin]="!roomid2:homeservername"
  63. role_recipients_matrix[dba]="!roomid3:homeservername"
  64. role_recipients_matrix[webmaster]="!roomid4:homeservername"
  65. role_recipients_matrix[proxyadmin]="!roomid5:homeservername"
  66. role_recipients_matrix[sitemgr]="!roomid6:homeservername"
  67. ```
  68. examples:
  69. folding:
  70. enabled: true
  71. title: ''
  72. list:
  73. - name: 'Basic Configuration'
  74. folding:
  75. enabled: false
  76. description: ''
  77. config: |
  78. #------------------------------------------------------------------------------
  79. # Matrix notifications
  80. SEND_MATRIX="YES"
  81. MATRIX_HOMESERVER="https://matrix.org:8448"
  82. MATRIX_ACCESSTOKEN="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  83. DEFAULT_RECIPIENT_MATRIX="!XXXXXXXXXXXX:matrix.org"
  84. troubleshooting:
  85. problems:
  86. list: []