-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathportal.application.conf
418 lines (377 loc) · 11.2 KB
/
portal.application.conf
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
412
413
414
415
416
417
418
# Copyright 2014 Brandon Arp
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ~~~~~
# Secret key
# ~~~~~
# The secret key is used to secure cryptographics functions.
# If you deploy your application to several instances be sure to use the same key!
play.http.secret.key = "j;CsRfxs6n[6fA>Bb2^4@YVNdNw0omx=2L;=jqvGqfCuouukvF/KSrLJI?e:6xi4"
# The application languages
# ~~~~~
play.i18n.langs = ["en"]
# Global object class
# ~~~~~
# Define the Global object class for this application.
# Default to Global in the root package.
pidfile.path = "/dev/null"
play.server.pidfile.path="/dev/null"
play.modules.disabled += "play.core.ObjectMapperModule"
play.modules.enabled += "global.MainModule"
play.http.actionCreator = "global.ActionCreator"
play.http.errorHandler = "global.ErrorHandler"
play.http.filters = "global.Filters"
play.http.session.httpOnly = false
play.filters.cors.pathPrefixes = ["/v1/", "/api/v1/"]
play.filters.csp.CSPFilter = "script-src 'self' 'unsafe-eval'"
play.evolutions.enabled = false
# Http Server
# ~~~~~
play.server.http.port = 8080
# Router
# ~~~~~
play.http.router = portal.Routes
# Controllers
# ~~~~~
hosts.limit = 1000
alerts.limit = 1000
reports.limit = 1000
# Health Provider
# ~~~~~
http.healthProvider.type = "com.arpnetworking.metrics.portal.health.PekkoMembershipHealthProvider"
# Features
# ~~~~~
portal.features {
# Telemetry
telemetry.enabled = true
# Proxy
proxy.enabled = true
proxy.preferred = false
# Host Registry
hostRegistry.enabled = false
# Alerts
alerts.enabled = false
# Rollups
rollups.enabled = false
# Reports
reports.enabled = false
reports.sourceTypes = [WEB_PAGE, GRAFANA]
reports.reportFormats = [HTML, PDF]
reports.recipientTypes = [EMAIL]
reports.intervals = [ONE_OFF, HOURLY, DAILY, WEEKLY, MONTHLY]
# Metrics aggregator ports
metricsAggregatorDaemonPorts = [7090]
}
# Metrics
# ~~~~~
metrics {
cluster = "metrics_portal"
service = "metrics_portal"
sinks = [
{
class = "com.arpnetworking.metrics.impl.ApacheHttpSink"
bufferSize = 10000
uri = "http://localhost:7090/metrics/v3/application"
parallelism = 2
maxBatchSize = 500
emptyQueueInterval = "PT0.5S"
eventsDroppedLoggingInterval = "PT1M"
dispatchErrorLoggingInterval = "PT1M"
unsupportedDataLoggingInterval = "PT1M"
}
]
jvm {
interval = "1000 millis"
dispatchers {
includeDefaultDispatcher = true
includeAdditionalDispatchers = []
}
}
# Deprecated:
#uri = "http://localhost:7090"
# NOTES:
# - uri is deprecated
# - specifying uri disables sinks
# - for backwards compatibility uri takes precedence over sinks
# - migrate to sinks as soon as possible
}
# Organization repository
# ~~~~~
organizationRepository.type = com.arpnetworking.metrics.portal.organizations.impl.DefaultOrganizationRepository
# Host repository
# ~~~~~
hostRepository.type = com.arpnetworking.metrics.portal.hosts.impl.NoHostRepository
# Alert repository
# ~~~~~
alertRepository.type = com.arpnetworking.metrics.portal.alerts.impl.NoAlertRepository
alertExecutionRepository.type = com.arpnetworking.metrics.portal.alerts.impl.NoAlertExecutionRepository
alertExecutionCache.enabled = false
# Report repositories
# ~~~~~
reportRepository.type = com.arpnetworking.metrics.portal.reports.impl.NoReportRepository
reportExecutionRepository.type = com.arpnetworking.metrics.portal.reports.impl.NoReportExecutionRepository
# Host provider
# ~~~~~
hostProvider {
type = com.arpnetworking.metrics.portal.hosts.impl.NoHostProvider
initialDelay = "60s"
interval = "1h"
}
# Rollups
# ~~~~~
rollup {
# TTL on the individual rollup series.
# Specifying 0 will use the global TTL configured by KairosDB.
ttl = 0s
generator.count = 5
generator.tagger.type = com.arpnetworking.notcommons.tagger.NoTagsTagger
executor.count = 5
executor.pollInterval = "5min"
manager.consistency_check_fraction_of_writes = 0.1
fetch.interval = "1h"
fetch.backoff = "5min"
maxBackFill.periods {
hourly = 2160
daily = 90
}
consistency_checker {
max_concurrent_requests = 1
buffer_size = 1000
}
# For enabling/disabling rollups of a particular metric
metric.whitelist = []
metric.blacklist = []
# Triggers double-checking that the rollup series result matches what
# you'd get by querying the rollup source series.
consistency_check.read_fraction=0.1
}
# KairosDB proxying
# ~~~~~
kairosdb.host = "localhost"
kairosdb.host = ${?KAIROSDB_HOST}
kairosdb.port = "8000"
kairosdb.port = ${?KAIROSDB_PORT}
kairosdb {
uri = "http://"${kairosdb.host}":"${kairosdb.port}
timeout = "1 hour"
}
kairosdb.proxy {
requireAggregators = false
addMergeAggregator = false
filterRollups = true
excludedTagNames = []
minAggregationPeriod = "1 minute"
# For enabling usage of a particular rollup in a query
rollups.whitelist = [
# Use available rollups for all metrics by default
{
pattern = ".*",
}
]
rollups.enabledOrigins = [
EXTERNAL_REQUEST
]
}
# Reporting
# ~~~~~
reporting {
renderers {
WEB_PAGE {
"text/html; charset=utf-8" {
type = "com.arpnetworking.metrics.portal.reports.impl.chrome.HtmlScreenshotRenderer"
}
"application/pdf" {
type = "com.arpnetworking.metrics.portal.reports.impl.chrome.PdfScreenshotRenderer"
}
}
GRAFANA {
"text/html; charset=utf-8" {
type = "com.arpnetworking.metrics.portal.reports.impl.chrome.grafana.HtmlGrafanaScreenshotRenderer"
}
"application/pdf" {
type = "com.arpnetworking.metrics.portal.reports.impl.chrome.grafana.PdfGrafanaScreenshotRenderer"
}
}
}
senders {
EMAIL {
type = "com.arpnetworking.metrics.portal.reports.impl.EmailSender"
fromAddress = "[email protected]"
allowedRecipients = [ ".+@.+" ]
}
}
}
alerting {
execution = {
# How often alert queries are polled
defaultInterval = 30s
# The offset from the scheduled polling time and the end of the query window.
# This can be used to account for data delay due to things such as aggregation.
# e.g. if data at minute X is not available until X + 3, this should be 3 minutes.
queryOffset = 0s
}
notifier = {
type = "com.arpnetworking.metrics.portal.alerts.impl.NopAlertNotifier"
}
}
blocking-io-dispatcher {
type = Dispatcher
executor = "thread-pool-executor"
thread-pool-executor {
fixed-pool-size = 16
}
throughput = 1
}
chrome {
path = "/usr/lib/chromium/chrome"
# ^ This path is only correct in the MPortal Docker image! If you aren't running MPortal in Docker, and you have reports enabled,
# you'll need to change this to the actual path to your Chrome binary.
args = {
# Command-line flags passed to Chrome. List of valid args: https://peter.sh/experiments/chromium-command-line-switches/
# Keys are flags without the leading `--`; values are strings (for flags that take args) or `true` (for flags that don't).
# e.g. command-line args of `chromium --foo --bar=baz` would be
# foo: true
# bar: baz
"no-sandbox": true
"remote-debugging-port": 48928
"remote-debugging-address": "0.0.0.0"
}
originConfigs = {
allowEverything = false
# ^ For applications where security is important, you probably want to disable this,
# to ensure that Chrome can't load resources from unsavory places.
byOrigin = {
"https://example.com" {
allowedNavigationPaths: [".*"]
allowedRequestPaths: [".*"]
# additionalHeaders: {"X-Extra-Header": "extra header value"}
}
}
}
# networkConfigurationProtocol = NETWORK
# ^ Uncomment if your Chromium version is so new it doesn't support the old Network DevTools API.
# I can't find for sure when that happened -- v73, I think.
}
# Queries
# ~~~~~
query {
executors {
KAIROS_DB {
type = "com.arpnetworking.metrics.portal.query.impl.NoQueryExecutor"
}
}
}
# Pekko
# ~~~~~
pekko {
# Loggers to register at boot time (org.apache.pekko.event.Logging$DefaultLogger logs
# to STDOUT)
loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"]
# Log level used by the configured loggers (see "loggers") as soon
# as they have been started; before that, see "stdout-loglevel"
# Options: OFF, ERROR, WARNING, INFO, DEBUG
loglevel = "DEBUG"
# Log level for the very basic logger activated during ActorSystem startup.
# This logger prints the log messages to stdout (System.out).
# Options: OFF, ERROR, WARNING, INFO, DEBUG
stdout-loglevel = "DEBUG"
# Filter of log events that is used by the LoggingAdapter before
# publishing log events to the eventStream.
logging-filter = "org.apache.pekko.event.slf4j.Slf4jLoggingFilter"
actor {
provider="cluster"
debug.unhandled = on
serializers = {
jackson-json = "com.arpnetworking.notcommons.pekko.JacksonSerializer"
}
serialization-bindings = {
"com.arpnetworking.notcommons.pekko.PekkoJsonSerializable" = "jackson-json"
}
default-dispatcher = {
fork-join-executor = {
parallelism-min = 8
parallelism-max = 64
parallelism-factor = 2.0
}
}
}
cluster {
seed-nodes=["pekko://[email protected]:2558"]
downing-provider-class = "org.apache.pekko.cluster.sbr.SplitBrainResolverProvider"
roles = [
"host_indexer",
"rollup_metrics_discovery",
"rollup_manager",
"report_repository_anti_entropy",
"alert_repository_anti_entropy",
"alert_execution_cache"
]
sharding {
guardian-name="sharding"
role=""
retry-interval="2 s"
buffer-size=100000
handoff-timeout="60 s"
rebalance-interval="10 s"
snapshot-interval="720 s"
state-store-mode="ddata"
least-shard-allocation-strategy {
rebalance-threshold=10
max-simultaneous-rebalance=3
}
}
}
remote.artery {
canonical.hostname="127.0.0.1"
canonical.port = 2558
bind.port = 2558
bind.hostname = "0.0.0.0"
}
persistence {
journal {
plugin = "jdbc-journal"
}
snapshot-store {
plugin = "jdbc-snapshot-store"
}
state {
plugin = "jdbc-durable-state-store"
}
}
http {
client {
parsing.max-content-length = 104857600
idle-timeout = 60s
}
host-connection-pool {
max-connections = 64
max-open-requests = 512
max-connection-lifetime = 60s
}
}
}
slick {
profile = "slick.jdbc.H2Profile$"
db {
url = "jdbc:h2:mem:test-database;DATABASE_TO_UPPER=false;"
user = "root"
password = "root"
driver = "org.h2.Driver"
numThreads = 5
maxConnections = 5
minConnections = 1
}
}
play.pekko.actor-system = "mportal"
play.server.pekko.requestTimeout = 600s
play.server.http.idleTimeout = 600s