master
md 167 lines 5.09 KB
Rendered Raw
1 <!--startmeta
2 custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/health/notifications/smseagle/README.md"
3 meta_yaml: "https://github.com/netdata/netdata/edit/master/src/health/notifications/smseagle/metadata.yaml"
4 sidebar_label: "SMSEagle"
5 learn_status: "Published"
6 learn_rel_path: "Alerts & Notifications/Notifications/Agent Dispatched Notifications"
7 keywords: ['smseagle']
8 message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE NOTIFICATION'S metadata.yaml FILE"
9 endmeta-->
10
11 # SMSEagle
12
13
14 <img src="https://netdata.cloud/img/smseagle.svg" width="150"/>
15
16
17 Forward notifications to SMSEagle device to send SMS, MMS, wake-up, or text-to-speech calls.
18
19
20 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
21
22 ## Setup
23
24
25 ### Prerequisites
26
27 ####
28
29 Before using the API, you'll need to enable API access on your SMSEagle device by following these steps:
30
31 1. Navigate to the Web-GUI and select the "Users" menu.
32 2. Create a new user account with "User" access level.
33 3. Locate the "Access to API" option next to your newly created user.
34 4. Select APIv2 and click the "Generate new token" button to create your API access token.
35 5. Set up the appropriate permissions in the APIv2 Permission section.
36
37 Optional: Enable the "Access to resources of all users" checkbox if you want this API key to access data across all users. By default, the API key can only access data created under its credentials.
38
39
40
41 ### Configuration
42
43 #### Options
44
45 The following options can be defined for this notification
46
47 <details open><summary>Config Options</summary>
48
49
50
51 | Option | Description | Default | Required |
52 |:-----|:------------|:--------|:---------:|
53 | [DEFAULT_RECIPIENT_SMSEAGLE](#option-default-recipient-smseagle) | If a role's recipients are not configured, a notification will be sent to this SMS recipient (empty = do not send a notification for unconfigured roles). Multiple recipients can be given like this: "PHONE1,PHONE2..." | | yes |
54 | [SMSEAGLE_API_URL](#option-smseagle-api-url) | | | yes |
55 | [SMSEAGLE_API_ACCESSTOKEN](#option-smseagle-api-accesstoken) | | | yes |
56 | [SMSEAGLE_MSG_TYPE](#option-smseagle-msg-type) | | sms | yes |
57 | [SMSEAGLE_CALL_DURATION](#option-smseagle-call-duration) | | 10 | yes |
58 | [SMSEAGLE_VOICE_ID](#option-smseagle-voice-id) | | 10 | yes |
59
60 <a id="option-default-recipient-smseagle"></a>
61 ##### DEFAULT_RECIPIENT_SMSEAGLE
62
63 All roles will default to this variable if left unconfigured.
64
65 You can then have different recipients per role, by editing `DEFAULT_RECIPIENT_SMSEAGLE` with the number you want, in the following entries at the bottom of the same file:
66 ```
67 role_recipients_smseagle[sysadmin]="+11222333444"
68 role_recipients_smseagle[domainadmin]="+11222333445"
69 role_recipients_smseagle[dba]="+11222333446"
70 role_recipients_smseagle[webmaster]="+11222333447"
71 role_recipients_smseagle[proxyadmin]="+11222333448"
72 role_recipients_smseagle[sitemgr]="+11222333449"
73 ```
74
75
76 <a id="option-smseagle-api-url"></a>
77 ##### SMSEAGLE_API_URL
78
79 The url of the SMSEagle device accessible from NetData, e.g https://192.168.0.101
80
81
82 <a id="option-smseagle-api-accesstoken"></a>
83 ##### SMSEAGLE_API_ACCESSTOKEN
84
85 An access token for the user created at SMSEagle device
86
87
88 <a id="option-smseagle-msg-type"></a>
89 ##### SMSEAGLE_MSG_TYPE
90
91 Choose a type of message/call. Available types: sms, mms, ring (wake-up call), tts (text-to-speech call), tts_advanced (multilanguage text-to-speech call). Be aware that some types require additional parameters to be set.
92
93
94 <a id="option-smseagle-call-duration"></a>
95 ##### SMSEAGLE_CALL_DURATION
96
97 Call duration, parameter required for Ring, TTS and TTS Advanced.
98
99
100 <a id="option-smseagle-voice-id"></a>
101 ##### SMSEAGLE_VOICE_ID
102
103 ID of the voice model, required for TTS Advanced.
104
105
106
107 </details>
108
109
110
111 #### via File
112
113 The configuration file name for this integration is `health_alarm_notify.conf`.
114
115
116 You can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-configuration-files) script from the
117 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory).
118
119 ```bash
120 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
121 sudo ./edit-config health_alarm_notify.conf
122 ```
123
124 ##### Examples
125
126 ###### Basic Configuration
127
128
129
130 ```yaml
131 #------------------------------------------------------------------------------
132 # SMSEagle options
133
134 SEND_SMSEAGLE="YES"
135 SMSEAGLE_API_URL="XXXXXXXX"
136 SMSEAGLE_API_ACCESSTOKEN="XXXXXXX"
137 SMSEAGLE_MSG_TYPE="sms"
138 SMSEAGLE_CALL_DURATION="10"
139 SMSEAGLE_VOICE_ID="1"
140 DEFAULT_RECIPIENT_SMSEAGLE="+11222333444"
141
142 ```
143
144
145 ## Troubleshooting
146
147 ### Test Notification
148
149 You can run the following command by hand, to test alerts configuration:
150
151 ```bash
152 # become user netdata
153 sudo su -s /bin/bash netdata
154
155 # enable debugging info on the console
156 export NETDATA_ALARM_NOTIFY_DEBUG=1
157
158 # send test alarms to sysadmin
159 /usr/libexec/netdata/plugins.d/alarm-notify.sh test
160
161 # send test alarms to any role
162 /usr/libexec/netdata/plugins.d/alarm-notify.sh test "ROLE"
163 ```
164
165 Note that this will test _all_ alert mechanisms for the selected role.
166
167