forked from nttgin/BGPalerter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml.example
311 lines (275 loc) · 8.18 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
connectors:
- file: connectorRIS
name: ris
params:
carefulSubscription: true
url: ws://ris-live.ripe.net/v1/ws/
perMessageDeflate: true
subscription:
moreSpecific: true
type: UPDATE
host:
socketOptions:
includeRaw: false
monitors:
- file: monitorHijack
channel: hijack
name: basic-hijack-detection
params:
thresholdMinPeers: 2
# - 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
- file: monitorAS
channel: misconfiguration
name: asn-monitor
params:
thresholdMinPeers: 3
- file: monitorRPKI
channel: rpki
name: rpki-monitor
params:
thresholdMinPeers: 1
checkUncovered: false
- file: monitorROAS
channel: rpki
name: rpki-monitor
reports:
- file: reportFile
channels:
- hijack
- newprefix
- visibility
- path
- misconfiguration
- rpki
params:
persistAlertData: false
alertDataDirectory: alertdata/
# - file: reportEmail
# channels:
# - hijack
# - newprefix
# - visibility
# - path
# - misconfiguration
# - rpki
# 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:
# noc:
# - file: reportSlack
# channels:
# - hijack
# - newprefix
# - visibility
# - path
# - misconfiguration
# - rpki
# params:
# showPaths: 0 # Amount of AS_PATHs to report in the alert
# colors:
# hijack: '#d60b1c'
# newprefix: '#fa9548'
# visibility: '#fad648'
# path: '#42cbf5'
# rpki: '#d892f0'
# hooks:
# default: _YOUR_SLACK_WEBHOOK_URL_
# noc: _YOUR_SLACK_WEBHOOK_URL_
# - file: reportKafka
# channels:
# - hijack
# - newprefix
# - visibility
# - path
# - misconfiguration
# - rpki
# params:
# host: localhost
# port: 9092
# topics:
# default: bgpalerter
# - file: reportSyslog
# channels:
# - hijack
# - newprefix
# - visibility
# - path
# - asn-monitor
# - misconfiguration
# - rpki
# params:
# host: 127.0.0.1
# port: 514
# transport: udp
# templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/master/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
# params:
# severity:
# hijack: critical
# newprefix: informational
# visibility: debug
# path: trace
# resourceTemplates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/master/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
# params:
# hooks:
# default: _YOUR_WEBEX_WEBHOOK_URL_
# noc: _YOUR_WEBEX_WEBHOOK_URL_
# - file: reportHTTP
# channels:
# - hijack
# - newprefix
# - visibility
# - path
# - misconfiguration
# - rpki
# params:
# templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/master/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
# 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_
############################
# 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
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
# host: null
# port: 8011
#
# - 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
############################
# 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/master/docs/http-proxy.md
# httpProxy: http://username:[email protected]:9000
############################
# RPKI settings:
# Global RPKI settings shared across all monitors requiring RPKI data
# More information here: https://github.com/nttgin/BGPalerter/blob/master/docs/rpki.md
rpki:
vrpProvider: ntt
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