-
Notifications
You must be signed in to change notification settings - Fork 42
/
config.yaml.tpl
327 lines (298 loc) · 11 KB
/
config.yaml.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
# This is the folder that contains the rule yaml files
# Any .yaml file will be loaded as a rule
rules_folder: {{ default .Env.ELASTALERT_RULES_DIRECTORY "/opt/rules" }}
# How often ElastAlert will query Elasticsearch
# The unit can be anything from weeks to seconds
run_every:
minutes: {{ default .Env.ELASTALERT_RUN_EVERY "3" }}
# ElastAlert will buffer results from the most recent
# period of time, in case some log sources are not in real time
buffer_time:
minutes: {{ default .Env.ELASTALERT_BUFFER_TIME "45" }}
# The Elasticsearch hostname for metadata writeback
# Note that every rule can have its own Elasticsearch host
es_host: {{ .Env.ELASTICSEARCH_HOST }}
# The Elasticsearch port
es_port: {{ .Env.ELASTICSEARCH_PORT }}
{{ if .Env.ELASTALERT_AWS_REGION }}
# The AWS region to use. Set this when using AWS-managed elasticsearch
aws_region: {{ .Env.ELASTALERT_AWS_REGION }}
{{ end }}
{{ if .Env.ELASTICSEARCH_URL_PREFIX }}
# Optional URL prefix for Elasticsearch
es_url_prefix: {{ .Env.ELASTICSEARCH_URL_PREFIX }}
{{ end }}
# Connect with TLS to Elasticsearch
use_ssl: {{ default .Env.ELASTICSEARCH_USE_SSL "False" }}
{{ if .Env.ELASTICSEARCH_SEND_GET_BODY_AS }}
# GET request with body is the default option for Elasticsearch.
# If it fails for some reason, you can pass 'GET', 'POST' or 'source'.
# See http://elasticsearch-py.readthedocs.io/en/master/connection.html?highlight=send_get_body_as#transport
# for details
es_send_get_body_as: {{ .Env.ELASTICSEARCH_SEND_GET_BODY_AS }}
{{ end }}
# Option basic-auth username and password for Elasticsearch
{{ if .Env.ELASTICSEARCH_USER }}
es_username: {{ .Env.ELASTICSEARCH_USER }}
{{ end }}
{{ if .Env.ELASTICSEARCH_PASSWORD }}
es_password: {{ .Env.ELASTICSEARCH_PASSWORD }}
{{ end }}
# Use SSL authentication with client certificates client_cert must be
# a pem file containing both cert and key for client
verify_certs: {{ default .Env.ELASTICSEARCH_VERIFY_CERTS "False" }}
{{ if .Env.ELASTICSEARCH_CA_CERTS }}
ca_certs: {{ .Env.ELASTICSEARCH_CA_CERTS }}
{{ end }}
{{ if .Env.ELASTICSEARCH_CLIENT_CERT }}
client_cert: {{ .Env.ELASTICSEARCH_CLIENT_CERT }}
{{ end }}
{{ if .Env.ELASTICSEARCH_CLIENT_KEY }}
client_key: {{ .Env.ELASTICSEARCH_CLIENT_KEY }}
{{ end }}
# The index on es_host which is used for metadata storage
# This can be a unmapped index, but it is recommended that you run
# elastalert-create-index to set a mapping
writeback_index: {{ default .Env.ELASTALERT_INDEX "elastalert_status" }}
# If an alert fails for some reason, ElastAlert will retry
# sending the alert until this time period has elapsed
alert_time_limit:
minutes: {{ default .Env.ELASTALERT_TIME_LIMIT "5" }}
disable_rules_on_error: {{ default .Env.ELASTALERT_DISABLE_RULES_ON_ERROR "True" }}
match_enhancements: {{ default .Env.ELASTALERT_MATCH_ENHANCEMENTS "[]" }}
run_enhancements_first: {{ default .Env.ELASTALERT_RUN_ENHANCEMENTS_FIRST "False" }}
{{ if .Env.ELASTALERT_EMAIL }}
# Email config
email: {{ .Env.ELASTALERT_EMAIL }}
{{ end }}
{{ if .Env.ELASTALERT_EMAIL_REPLY_TO }}
email_reply_to: {{ .Env.ELASTALERT_EMAIL_REPLY_TO }}
{{ end }}
{{ if .Env.ELASTALERT_FROM_ADDR }}
from_addr: {{ .Env.ELASTALERT_FROM_ADDR }}
{{ end }}
{{ if .Env.ELASTALERT_NOTIFY_EMAIL }}
notify_email: {{ .Env.ELASTALERT_NOTIFY_EMAIL }}
{{ end }}
{{ if .Env.ELASTALERT_SMTP_HOST }}
smtp_host: {{ .Env.ELASTALERT_SMTP_HOST }}
{{ end }}
{{ if .Env.ELASTALERT_EXOTEL_ACCOUNT_SID }}
# Exotel config
exotel_account_sid: {{ .Env.ELASTALERT_EXOTEL_ACCOUNT_SID }}
{{ end }}
{{ if .Env.ELASTALERT_EXOTEL_AUTH_TOKEN }}
exotel_auth_token: {{ .Env.ELASTALERT_EXOTEL_AUTH_TOKEN }}
{{ end }}
{{ if .Env.ELASTALERT_EXOTEL_FROM_NUMBER }}
exotel_from_number: {{ .Env.ELASTALERT_EXOTEL_FROM_NUMBER }}
{{ end }}
{{ if .Env.ELASTALERT_EXOTEL_TO_NUMBER }}
exotel_to_number: {{ .Env.ELASTALERT_EXOTEL_TO_NUMBER }}
{{ end }}
{{ if .Env.ELASTALERT_GITTER_WEBHOOK_URL }}
# Gitter config
gitter_webhook_url: {{ .Env.ELASTALERT_GITTER_WEBHOOK_URL }}
{{ end }}
{{ if .Env.ELASTALERT_GITTER_PROXY }}
gitter_proxy: {{ .Env.ELASTALERT_GITTER_PROXY }}
{{ end }}
{{ if .Env.ELASTALERT_GITTER_MSG_LEVEL }}
gitter_msg_level: {{ .Env.ELASTALERT_GITTER_MSG_LEVEL }}
{{ end }}
{{ if .Env.ELASTALERT_HIPCHAT_AUTH_TOKEN }}
# Hipchat config
hipchat_auth_token: {{ .Env.ELASTALERT_HIPCHAT_AUTH_TOKEN }}
{{ end }}
{{ if .Env.ELASTALERT_HIPCHAT_DOMAIN }}
hipchat_domain: {{ .Env.ELASTALERT_HIPCHAT_DOMAIN }}
{{ end }}
{{ if .Env.ELASTALERT_HIPCHAT_FROM }}
hipchat_from: {{ .Env.ELASTALERT_HIPCHAT_FROM }}
{{ end }}
{{ if .Env.ELASTALERT_HIPCHAT_IGNORE_SSL_ERRORS }}
hipchat_ignore_ssl_errors: {{ .Env.ELASTALERT_HIPCHAT_IGNORE_SSL_ERRORS }}
{{ end }}
{{ if .Env.ELASTALERT_HIPCHAT_NOTIFY }}
hipchat_notify: {{ .Env.ELASTALERT_HIPCHAT_NOTIFY }}
{{ end }}
{{ if .Env.ELASTALERT_HIPCHAT_ROOM_ID }}
hipchat_room_id: {{ .Env.ELASTALERT_HIPCHAT_ROOM_ID }}
{{ end }}
{{ if .Env.ELASTALERT_JIRA_ACCOUNT_FILE }}
# Jira config
jira_account_file: {{ .Env.ELASTALERT_JIRA_ACCOUNT_FILE }}
{{ end }}
{{ if .Env.ELASTALERT_JIRA_ASSIGNEE }}
jira_assignee: {{ .Env.ELASTALERT_JIRA_ASSIGNEE }}
{{ end }}
{{ if .Env.ELASTALERT_JIRA_BUMP_IN_STATUSES }}
jira_bump_in_statuses: {{ .Env.ELASTALERT_JIRA_BUMP_IN_STATUSES }}
{{ end }}
{{ if .Env.ELASTALERT_JIRA_BUMP_NOT_IN_STATUSES }}
jira_bump_not_in_statuses: {{ .Env.ELASTALERT_JIRA_BUMP_NOT_IN_STATUSES }}
{{ end }}
{{ if .Env.ELASTALERT_JIRA_BUMP_TICKETS }}
jira_bump_tickets: {{ .Env.ELASTALERT_JIRA_BUMP_TICKETS }}
{{ end }}
{{ if .Env.ELASTALERT_JIRA_COMPONENT }}
jira_component: {{ .Env.ELASTALERT_JIRA_COMPONENT }}
{{ end }}
{{ if .Env.ELASTALERT_JIRA_COMPONENTS }}
jira_components: {{ .Env.ELASTALERT_JIRA_COMPONENTS }}
{{ end }}
{{ if .Env.ELASTALERT_JIRA_ISSUETYPE }}
jira_issuetype: {{ .Env.ELASTALERT_JIRA_ISSUETYPE }}
{{ end }}
{{ if .Env.ELASTALERT_JIRA_LABEL }}
jira_label: {{ .Env.ELASTALERT_JIRA_LABEL }}
{{ end }}
{{ if .Env.ELASTALERT_JIRA_LABELS }}
jira_labels: {{ .Env.ELASTALERT_JIRA_LABELS }}
{{ end }}
{{ if .Env.ELASTALERT_JIRA_MAX_AGE }}
jira_max_age: {{ .Env.ELASTALERT_JIRA_MAX_AGE }}
{{ end }}
{{ if .Env.ELASTALERT_JIRA_PROJECT }}
jira_project: {{ .Env.ELASTALERT_JIRA_PROJECT }}
{{ end }}
{{ if .Env.ELASTALERT_JIRA_SERVER }}
jira_server: {{ .Env.ELASTALERT_JIRA_SERVER }}
{{ end }}
{{ if .Env.ELASTALERT_JIRA_WATCHERS }}
jira_watchers: {{ .Env.ELASTALERT_JIRA_WATCHERS }}
{{ end }}
{{ if .Env.ELASTALERT_OPSGENIE_ACCOUNT }}
# Opsgenie config
opsgenie_account: {{ .Env.ELASTALERT_OPSGENIE_ACCOUNT }}
{{ end }}
{{ if .Env.ELASTALERT_OPSGENIE_ADDR }}
opsgenie_addr: {{ .Env.ELASTALERT_OPSGENIE_ADDR }}
{{ end }}
{{ if .Env.ELASTALERT_OPSGENIE_ALIAS }}
opsgenie_alias: {{ .Env.ELASTALERT_OPSGENIE_ALIAS }}
{{ end }}
{{ if .Env.ELASTALERT_OPSGENIE_KEY }}
opsgenie_key: {{ .Env.ELASTALERT_OPSGENIE_KEY }}
{{ end }}
{{ if .Env.ELASTALERT_OPSGENIE_MESSAGE }}
opsgenie_message: {{ .Env.ELASTALERT_OPSGENIE_MESSAGE }}
{{ end }}
{{ if .Env.ELASTALERT_OPSGENIE_PROXY }}
opsgenie_proxy: {{ .Env.ELASTALERT_OPSGENIE_PROXY }}
{{ end }}
{{ if .Env.ELASTALERT_OPSGENIE_RECIPIENTS }}
opsgenie_recipients: {{ .Env.ELASTALERT_OPSGENIE_RECIPIENTS }}
{{ end }}
{{ if .Env.ELASTALERT_OPSGENIE_TAGS }}
opsgenie_tags: {{ .Env.ELASTALERT_OPSGENIE_TAGS }}
{{ end }}
{{ if .Env.ELASTALERT_OPSGENIE_TEAMS }}
opsgenie_teams: {{ .Env.ELASTALERT_OPSGENIE_TEAMS }}
{{ end }}
{{ if .Env.ELASTALERT_PAGERDUTY_CLIENT_NAME }}
# Pagerduty config
pagerduty_client_name: {{ .Env.ELASTALERT_PAGERDUTY_CLIENT_NAME }}
{{ end }}
{{ if .Env.ELASTALERT_PAGERDUTY_EVENT_TYPE }}
pagerduty_event_type: {{ .Env.ELASTALERT_PAGERDUTY_EVENT_TYPE }}
{{ end }}
{{ if .Env.ELASTALERT_PAGERDUTY_SERVICE_KEY }}
pagerduty_service_key: {{ .Env.ELASTALERT_PAGERDUTY_SERVICE_KEY }}
{{ end }}
{{ if .Env.ELASTALERT_SLACK_EMOJI_OVERRIDE }}
# Slack config
slack_emoji_override: {{ .Env.ELASTALERT_SLACK_EMOJI_OVERRIDE }}
{{ end }}
{{ if .Env.ELASTALERT_SLACK_ICON_URL_OVERRIDE }}
slack_icon_url_override: {{ .Env.ELASTALERT_SLACK_ICON_URL_OVERRIDE }}
{{ end }}
{{ if .Env.ELASTALERT_SLACK_MSG_COLOR }}
slack_msg_color: {{ .Env.ELASTALERT_SLACK_MSG_COLOR }}
{{ end }}
{{ if .Env.ELASTALERT_SLACK_PARSE_OVERRIDE }}
slack_parse_override: {{ .Env.ELASTALERT_SLACK_PARSE_OVERRIDE }}
{{ end }}
{{ if .Env.ELASTALERT_SLACK_TEXT_STRING }}
slack_text_string: {{ .Env.ELASTALERT_SLACK_TEXT_STRING }}
{{ end }}
{{ if .Env.ELASTALERT_SLACK_USERNAME_OVERRIDE }}
slack_username_override: {{ .Env.ELASTALERT_SLACK_USERNAME_OVERRIDE }}
{{ end }}
{{ if .Env.ELASTALERT_SLACK_WEBHOOK_URL }}
slack_webhook_url: {{ .Env.ELASTALERT_SLACK_WEBHOOK_URL }}
{{ end }}
{{ if .Env.ELASTALERT_TELEGRAM_BOT_TOKEN }}
# Telegram config
telegram_bot_token: {{ .Env.ELASTALERT_TELEGRAM_BOT_TOKEN }}
{{ end }}
{{ if .Env.ELASTALERT_TELEGRAM_ROOM_ID }}
telegram_room_id: {{ .Env.ELASTALERT_TELEGRAM_ROOM_ID }}
{{ end }}
{{ if .Env.ELASTALERT_TELEGRAM_API_URL }}
telegram_api_url: {{ .Env.ELASTALERT_TELEGRAM_API_URL }}
{{ end }}
{{ if .Env.ELASTALERT_TWILIO_ACCOUNT_SID }}
# Twilio config
twilio_account_sid: {{ .Env.ELASTALERT_TWILIO_ACCOUNT_SID }}
{{ end }}
{{ if .Env.ELASTALERT_TWILIO_AUTH_TOKEN }}
twilio_auth_token: {{ .Env.ELASTALERT_TWILIO_AUTH_TOKEN }}
{{ end }}
{{ if .Env.ELASTALERT_TWILIO_TO_NUMBER }}
twilio_to_number: {{ .Env.ELASTALERT_TWILIO_TO_NUMBER }}
{{ end }}
{{ if .Env.ELASTALERT_TWILIO_FROM_NUMBER }}
twilio_from_number: {{ .Env.ELASTALERT_TWILIO_FROM_NUMBER }}
{{ end }}
{{ if .Env.ELASTALERT_VICTOROPS_API_KEY }}
# VictorOps config
victorops_api_key: {{ .Env.ELASTALERT_VICTOROPS_API_KEY }}
{{ end }}
{{ if .Env.ELASTALERT_VICTOROPS_ROUTING_KEY }}
victorops_routing_key: {{ .Env.ELASTALERT_VICTOROPS_ROUTING_KEY }}
{{ end }}
{{ if .Env.ELASTALERT_VICTOROPS_MESSAGE_TYPE }}
victorops_message_type: {{ .Env.ELASTALERT_VICTOROPS_MESSAGE_TYPE }}
{{ end }}
{{ if .Env.ELASTALERT_VICTOROPS_ENTITY_DISPLAY_NAME }}
victorops_entity_display_name: {{ .Env.ELASTALERT_VICTOROPS_ENTITY_DISPLAY_NAME }}
{{ end }}
{{ if .Env.ELASTALERT_WECHAT_CORP_ID }}
# WeChat config
wechat_corp_id: {{ .Env.ELASTALERT_WECHAT_CORP_ID }}
{{ end }}
{{ if .Env.ELASTALERT_WECHAT_SECRET }}
wechat_secret: {{ .Env.ELASTALERT_WECHAT_SECRET }}
{{ end }}
{{ if .Env.ELASTALERT_WECHAT_AGENT_ID }}
wechat_agent_id: {{ .Env.ELASTALERT_WECHAT_AGENT_ID }}
{{ end }}
{{ if .Env.ELASTALERT_WECHAT_PARTY_ID }}
wechat_party_id: {{ .Env.ELASTALERT_WECHAT_PARTY_ID }}
{{ end }}
{{ if .Env.ELASTALERT_WECHAT_USER_ID }}
wechat_user_id: {{ .Env.ELASTALERT_WECHAT_USER_ID }}
{{ end }}
{{ if .Env.ELASTALERT_WECHAT_TAG_ID }}
wechat_tag_id: {{ .Env.ELASTALERT_WECHAT_TAG_ID }}
{{ end }}
{{ if .Env.ELASTALERT_DINGTALK_ACCESS_TOKEN }}
# Dingtalk config
dingtalk_access_token: {{ .Env.ELASTALERT_DINGTALK_ACCESS_TOKEN }}
{{ end }}
{{ if .Env.ELASTALERT_DINGTALK_SECRET }}
dingtalk_secret: {{ .Env.ELASTALERT_DINGTALK_SECRET }}
{{ end }}
{{ if .Env.ELASTALERT_DINGTALK_AT_MOBILES }}
dingtalk_at_mobiles: {{ .Env.ELASTALERT_DINGTALK_AT_MOBILES }}
{{ end }}
{{ if .Env.ELASTALERT_DINGTALK_AT_ALL }}
dingtalk_at_all: {{ .Env.ELASTALERT_DINGTALK_AT_ALL }}
{{ end }}
{{ if .Env.ELASTALERT_DINGTALK_MSGTYPE }}
dingtalk_msgtype: {{ .Env.ELASTALERT_DINGTALK_MSGTYPE }}
{{ end }}
{{ if .Env.ELASTALERT_DINGTALK_SECURITY_TYPE }}
dingtalk_security_type: {{ .Env.ELASTALERT_DINGTALK_SECURITY_TYPE }}
{{ end }}