| 1 | # yamllint disable rule:line-length |
| 2 | --- |
| 3 | - id: 'notify-sms' |
| 4 | meta: |
| 5 | name: 'SMS' |
| 6 | link: 'http://smstools3.kekekasvi.com/' |
| 7 | categories: |
| 8 | - notify.agent |
| 9 | icon_filename: 'sms.svg' |
| 10 | keywords: |
| 11 | - SMS tools 3 |
| 12 | - SMS |
| 13 | - Messaging |
| 14 | overview: |
| 15 | notification_description: | |
| 16 | Send notifications to `smstools3` using Netdata's Agent alert notification feature, which supports dozens of endpoints, user roles, and more. |
| 17 | The SMS Server Tools 3 is a SMS Gateway software which can send and receive short messages through GSM modems and mobile phones. |
| 18 | notification_limitations: '' |
| 19 | setup: |
| 20 | prerequisites: |
| 21 | list: |
| 22 | - title: '' |
| 23 | description: | |
| 24 | - [Install](http://smstools3.kekekasvi.com/index.php?p=compiling) and [configure](http://smstools3.kekekasvi.com/index.php?p=configure) `smsd` |
| 25 | - To ensure that the user `netdata` can execute `sendsms`. Any user executing `sendsms` needs to: |
| 26 | - Have write permissions to /tmp and /var/spool/sms/outgoing |
| 27 | - Be a member of group smsd |
| 28 | - To ensure that the steps above are successful, just su netdata and execute sendsms phone message. |
| 29 | - Access to the terminal where Netdata Agent is running |
| 30 | configuration: |
| 31 | file: |
| 32 | name: 'health_alarm_notify.conf' |
| 33 | options: |
| 34 | description: 'The following options can be defined for this notification' |
| 35 | folding: |
| 36 | title: 'Config Options' |
| 37 | enabled: true |
| 38 | list: |
| 39 | - name: 'sendsms' |
| 40 | default_value: 'YES' |
| 41 | description: "Set the path for `sendsms`, otherwise Netdata will search for it in your system `$PATH:`" |
| 42 | required: true |
| 43 | detailed_description: | |
| 44 | # The full path of the sendsms command (smstools3). |
| 45 | # If empty, the system $PATH will be searched for it. |
| 46 | # If not found, SMS notifications will be silently disabled. |
| 47 | sendsms="/usr/bin/sendsms" |
| 48 | - name: 'SEND_SMS' |
| 49 | default_value: '' |
| 50 | description: "Set `SEND_SMS` to `YES`." |
| 51 | required: true |
| 52 | - name: 'DEFAULT_RECIPIENT_SMS' |
| 53 | default_value: '' |
| 54 | description: "Set DEFAULT_RECIPIENT_SMS to the phone number you want the alert notifications to be sent to. You can define multiple phone numbers like this: PHONE1 PHONE2." |
| 55 | required: true |
| 56 | detailed_description: | |
| 57 | All roles will default to this variable if left unconfigured. |
| 58 | |
| 59 | You can then have different phone numbers per role, by editing `DEFAULT_RECIPIENT_SMS` with the phone number you want, in the following entries at the bottom of the same file: |
| 60 | ```text |
| 61 | role_recipients_sms[sysadmin]="PHONE1" |
| 62 | role_recipients_sms[domainadmin]="PHONE2" |
| 63 | role_recipients_sms[dba]="PHONE3" |
| 64 | role_recipients_sms[webmaster]="PHONE4" |
| 65 | role_recipients_sms[proxyadmin]="PHONE5" |
| 66 | role_recipients_sms[sitemgr]="PHONE6" |
| 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 | # SMS Server Tools 3 (smstools3) global notification options |
| 80 | SEND_SMS="YES" |
| 81 | DEFAULT_RECIPIENT_SMS="1234567890" |
| 82 | troubleshooting: |
| 83 | problems: |
| 84 | list: [] |