| 1 | # yamllint disable rule:line-length |
| 2 | --- |
| 3 | - id: 'notify-teams' |
| 4 | meta: |
| 5 | name: 'Microsoft Teams' |
| 6 | link: 'https://www.microsoft.com/en-us/microsoft-teams/log-in' |
| 7 | categories: |
| 8 | - notify.agent |
| 9 | icon_filename: 'msteams.svg' |
| 10 | keywords: |
| 11 | - Microsoft |
| 12 | - Teams |
| 13 | - MS teams |
| 14 | overview: |
| 15 | notification_description: | |
| 16 | You can send Netdata alerts to Microsoft Teams using Netdata's Agent alert notification feature, which supports dozens of endpoints, user roles, and more. |
| 17 | notification_limitations: '' |
| 18 | setup: |
| 19 | prerequisites: |
| 20 | list: |
| 21 | - title: '' |
| 22 | description: | |
| 23 | - The incoming webhook URL as given by Microsoft Teams. You can use the same on all your Netdata servers (or you can have multiple if you like). |
| 24 | - One or more channels to post the messages to |
| 25 | - Access to the terminal where Netdata Agent is running |
| 26 | configuration: |
| 27 | file: |
| 28 | name: 'health_alarm_notify.conf' |
| 29 | options: |
| 30 | description: 'The following options can be defined for this notification' |
| 31 | folding: |
| 32 | title: 'Config Options' |
| 33 | enabled: true |
| 34 | list: |
| 35 | - name: 'SEND_MSTEAMS' |
| 36 | default_value: 'YES' |
| 37 | description: "Set `SEND_MSTEAMS` to YES" |
| 38 | required: true |
| 39 | - name: 'MSTEAMS_WEBHOOK_URL' |
| 40 | default_value: '' |
| 41 | description: "set `MSTEAMS_WEBHOOK_URL` to the incoming webhook URL as given by Microsoft Teams." |
| 42 | required: true |
| 43 | - name: 'DEFAULT_RECIPIENT_MSTEAMS' |
| 44 | default_value: '' |
| 45 | description: "Set `DEFAULT_RECIPIENT_MSTEAMS` to the encoded Microsoft Teams channel name you want the alert notifications to be sent to." |
| 46 | required: true |
| 47 | detailed_description: | |
| 48 | In Microsoft Teams the channel name is encoded in the URI after `/IncomingWebhook/`. You can define multiple channels like this: `CHANNEL1` `CHANNEL2`. |
| 49 | |
| 50 | All roles will default to this variable if left unconfigured. |
| 51 | |
| 52 | You can have different channels per role, by editing `DEFAULT_RECIPIENT_MSTEAMS` with the channel you want, in the following entries at the bottom of the same file: |
| 53 | ```text |
| 54 | role_recipients_msteams[sysadmin]="CHANNEL1" |
| 55 | role_recipients_msteams[domainadmin]="CHANNEL2" |
| 56 | role_recipients_msteams[dba]="databases CHANNEL3" |
| 57 | role_recipients_msteams[webmaster]="CHANNEL4" |
| 58 | role_recipients_msteams[proxyadmin]="CHANNEL5" |
| 59 | role_recipients_msteams[sitemgr]="CHANNEL6" |
| 60 | ``` |
| 61 | examples: |
| 62 | folding: |
| 63 | enabled: true |
| 64 | title: '' |
| 65 | list: |
| 66 | - name: 'Basic Configuration' |
| 67 | folding: |
| 68 | enabled: false |
| 69 | description: '' |
| 70 | config: | |
| 71 | #------------------------------------------------------------------------------ |
| 72 | # Microsoft Teams (office.com) global notification options |
| 73 | |
| 74 | SEND_MSTEAMS="YES" |
| 75 | MSTEAMS_WEBHOOK_URL="https://outlook.office.com/webhook/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX@XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/IncomingWebhook/CHANNEL/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" |
| 76 | DEFAULT_RECIPIENT_MSTEAMS="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" |
| 77 | troubleshooting: |
| 78 | problems: |
| 79 | list: [] |