-
Notifications
You must be signed in to change notification settings - Fork 147
/
config.yml.example
412 lines (367 loc) · 10.6 KB
/
config.yml.example
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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
connectors:
- file: connectorRIS
name: ris
params:
blacklistSources:
- 123.0.0.1/24
- 3453
carefulSubscription: true
url: ws://ris-live.ripe.net/v1/ws/
perMessageDeflate: true
authorizationHeader: null
subscription:
moreSpecific: true
type: UPDATE
host:
socketOptions:
includeRaw: false
# - file: connectorRISDump
# name: dmp
monitors:
- file: monitorHijack
channel: hijack
name: basic-hijack-detection
params:
thresholdMinPeers: 3
# - file: monitorNewPrefix
# channel: newprefix
# name: prefix-detection
# params:
# thresholdMinPeers: 3
- file: monitorPath
channel: path
name: path-matching
params:
thresholdMinPeers: 1
- file: monitorVisibility
channel: visibility
name: withdrawal-detection
params:
thresholdMinPeers: 40
notificationIntervalSeconds: 3600
- file: monitorAS
channel: misconfiguration
name: asn-monitor
params:
skipPrefixMatch: false
thresholdMinPeers: 3
- file: monitorRPKI
channel: rpki
name: rpki-monitor
params:
thresholdMinPeers: 3
checkUncovered: false
checkDisappearing: false
- file: monitorROAS
channel: roa
name: rpki-diff
params:
enableDiffAlerts: true
enableExpirationAlerts: true
enableExpirationCheckTA: true
enableDeletedCheckTA: true
enableAdvancedRpkiStats: false
roaExpirationAlertHours: 2
checkOnlyASns: true
toleranceDeletedRoasTA:
ripe: 20
apnic: 20
arin: 20
lacnic: 20
afrinic: 50
toleranceExpiredRoasTA:
ripe: 20
apnic: 20
arin: 20
lacnic: 20
afrinic: 50
- file: monitorPathNeighbors
channel: path
name: path-neighbors
params:
thresholdMinPeers: 3
reports:
- file: reportFile
channels:
- hijack
- newprefix
- visibility
- path
- misconfiguration
- rpki
- roa
params:
persistAlertData: false
alertDataDirectory: alertdata/
# - file: reportEmail
# channels:
# - hijack
# - newprefix
# - visibility
# - path
# - misconfiguration
# - rpki
# - roa
# params:
# showPaths: 5 # Amount of AS_PATHs to report in the alert
# senderEmail: bgpalerter@xxxx
# # BGPalerter uses nodemailer.
# # The smtp section can be configured with all the parameters available at https://nodemailer.com/smtp/
# # the following are just the most useful one
# smtp:
# host: localhost
# port: 25
# secure: false # If true the connection will use TLS when connecting to server. If false it will be still possible doing connection upgrade via STARTTLS
# ignoreTLS: false # If true TLS will be completely disabled, including STARTTLS. Set this to true if you see certificate errors in the logs.
# auth:
# user: username
# pass: password
# type: login
# tls:
# rejectUnauthorized: true # Reject unauthorized certificates
# notifiedEmails:
# default:
# - admin@example.org
# noc:
# - joe@example.org
# - seb@example.org
# - file: reportSlack
# channels:
# - hijack
# - newprefix
# - visibility
# - path
# - misconfiguration
# - rpki
# - roa
# params:
# showPaths: 0 # Amount of AS_PATHs to report in the alert
# colors:
# hijack: '#d60b1c'
# newprefix: '#fa9548'
# visibility: '#fad648'
# path: '#42cbf5'
# rpki: '#d892f0'
# roa: '#d892f0'
# hooks:
# default: _YOUR_SLACK_WEBHOOK_URL_
# noc: _YOUR_SLACK_WEBHOOK_URL_
# - file: reportKafka
# channels:
# - hijack
# - newprefix
# - visibility
# - path
# - misconfiguration
# - rpki
# - roa
# params:
# host: localhost
# port: 9092
# topics:
# default: bgpalerter
# - file: reportSyslog
# channels:
# - hijack
# - newprefix
# - visibility
# - path
# - asn-monitor
# - misconfiguration
# - rpki
# - roa
# params:
# host: 127.0.0.1
# port: 514
# transport: udp
# templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/main/docs/context.md
# default: "++BGPalerter-3-${type}: ${summary}|${earliest}|${latest}"
# hijack: "++BGPalerter-5-${type}: ${summary}|${prefix}|${description}|${asn}|${newprefix}|${neworigin}|${earliest}|${latest}|${peers}"
# newprefix: "++BGPalerter-4-${type}: ${summary}|${prefix}|${description}|${asn}|${newprefix}|${neworigin}|${earliest}|${latest}|${peers}"
# visibility: "++BGPalerter-5-${type}: ${summary}|${prefix}|${description}|${asn}|${earliest}|${latest}|${peers}"
# misconfiguration: "++BGPalerter-3-${type}: ${summary}|${asn}|${prefix}|${earliest}|${latest}"
# - file: reportAlerta
# channels:
# - hijack
# - newprefix
# - visibility
# - path
# - misconfiguration
# - rpki
# - roa
# params:
# severity:
# hijack: critical
# newprefix: informational
# visibility: debug
# path: trace
# resourceTemplates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/main/docs/context.md
# default: "${type}"
# hijack: "hijack::${prefix}@@${asn}"
# newprefix: "newprefix::${prefix}@@${asn}"
# visibility: "visibility::${prefix}@@${asn}"
# urls:
# default: _YOUR_ALERTA_API_URL_
# noc: _YOUR_ALERTA_API_URL_
# - file: reportWebex
# channels:
# - hijack
# - newprefix
# - visibility
# - path
# - misconfiguration
# - rpki
# - roa
# params:
# hooks:
# default: _YOUR_WEBEX_WEBHOOK_URL_
# noc: _YOUR_WEBEX_WEBHOOK_URL_
# - file: reportHTTP
# channels:
# - hijack
# - newprefix
# - visibility
# - path
# - misconfiguration
# - rpki
# - roa
# params:
# method: post
# templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/main/docs/context.md
# default: '{"text": "${summary}"}'
# headers:
# isTemplateJSON: true
# showPaths: 0 # Amount of AS_PATHs to report in the alert
# hooks:
# default: _YOUR_WEBHOOK_URL_
# noc: _YOUR_WEBHOOK_URL_
# - file: reportTelegram
# channels:
# - hijack
# - newprefix
# - visibility
# - path
# - misconfiguration
# - rpki
# - roa
# params:
# showPaths: 0 # Amount of AS_PATHs to report in the alert
# botUrl: https://api.telegram.org/bot<_BOT_ID_>/sendMessage
# chatIds:
# default: _CHAT_ID_
# noc: _CHAT_ID_
# - file: reportPullAPI
# channels:
# - hijack
# - newprefix
# - visibility
# - path
# - misconfiguration
# - rpki
# - roa
# params:
# maxAlertsAmount: 25
# - file: reportMatrix
# channels:
# - hijack
# - newprefix
# - visibility
# - path
# - misconfiguration
# - rpki
# - roa
# params:
# showPaths: 0 # Amount of AS_PATHs to report in the alert
# homeserverUrl: https://matrix.org
# accessToken: _ACCESS_TOKEN_
# roomIds:
# default: _ROOM_ID_
# noc: _ROOM_ID_
############################
# Notification settings:
# - notificationIntervalSeconds
# Defines the amount of seconds after which an alert can be repeated. An alert is repeated only if the event that
# triggered it is not yet solved.
# - persistStatus
# Persist the status of BGPalerter. If the process is restarted, the list of alerts already sent is recovered
# and they are not repeated. The process must be able to write on disc, this option will create a file inside .cache/
notificationIntervalSeconds: 86400
persistStatus: true
############################
# REST API settings:
# - rest.host
# The IP address the server will listen. The default value is localhost, this means the API will not be reachable
# from another host. To make it public use null or 0.0.0.0.
# - rest.port
# The port the server will listen
rest:
host: localhost
port: 8011
logging:
directory: logs
logRotatePattern: YYYY-MM-DD
maxRetainedFiles: 10
maxFileSizeMB: 15
compressOnRotation: false
useUTC: true
checkForUpdatesAtBoot: true
generatePrefixListEveryDays: 0
############################
# Process monitoring settings:
# Uncomment or add classes under processMonitors if you want to monitor or send logs about the status of the BGPalerter process
#processMonitors:
# - file: uptimeApi
# params:
# useStatusCodes: true
#
# - file: uptimeHealthcheck
# params:
# url: url_to_poll
# intervalSeconds: 300
# method: get
#
# - file: sentryModule
# params:
# dsn: https://<key>@sentry.io/<project>
############################
# The files containing the monitored prefixes. Please see prefixes.yml for an example.
# This is an array (use new lines and dashes!)
monitoredPrefixesFiles:
- prefixes.yml
############################
# The file containing the user groups.
# User groups can be specified
# 1) directly above, in each report module; or
# 2) inside an external file, as specified below (disabled by default).
# Using an external file allows BGPalerter to auto-reload the user group definitions
# when the external file is changed.
# groupsFile: groups.yml.example
############################
# HTTP proxy setting:
# Allow to run BGPalerter behind an HTTP/HTTPS proxy.
# You can also specify which module can bypass the proxy.
# More information here: https://github.com/nttgin/BGPalerter/blob/main/docs/http-proxy.md
# httpProxy: http://username:password@127.0.0.1:9000
############################
# RPKI settings:
# Global RPKI settings shared across all monitors requiring RPKI data
# More information here: https://github.com/nttgin/BGPalerter/blob/main/docs/rpki.md
#
# To enable ROA expiration alerts, you need VRPs including expiration timestamps.
# "rpkiclient" is the default vrpProvider since is the only one supporting ROAs expiration data.
rpki:
vrpProvider: rpkiclient
preCacheROAs: true
refreshVrpListMinutes: 15
markDataAsStaleAfterMinutes: 120
############################
# Advanced settings (Don't touch here!)
# Please, refer to the documentation to know the meaning of the following parameters.
alertOnlyOnce: false
fadeOffSeconds: 360
checkFadeOffGroupsSeconds: 30
pidFile: bgpalerter.pid
maxMessagesPerSecond: 6000
multiProcess: false
environment: production
configVersion: 2