-
Notifications
You must be signed in to change notification settings - Fork 37
/
consts.go
47 lines (36 loc) · 1.67 KB
/
consts.go
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
package vector
const (
configDirpath = "/etc/vector/"
////////////////////////--VECTOR CONTAINER CONFIGURATION SECTION--/////////////////////////////
containerImage = "timberio/vector:0.31.0-debian"
configFilepath = configDirpath + "vector.toml"
binaryFilepath = "/usr/bin/vector"
configFileFlag = "-c"
logsStorageDirpath = "/var/log/kurtosis/"
////////////////////////--FINISH VECTOR CONTAINER CONFIGURATION SECTION--/////////////////////////////
////////////////////////--VECTOR CONFIGURATION SECTION--/////////////////////////////
fluentBitSourceId = "\"fluent_bit\""
fluentBitSourceType = "\"fluent\""
fluentBitSourceIpAddress = "0.0.0.0"
fileSinkId = "\"file\""
fileTypeId = "\"file\""
// We store log files in the volume per-enclave, per-service
// To construct the filepath, we utilize vectors template syntax that allows us to reference fields in log events
// https://vector.dev/docs/reference/configuration/template-syntax/
logsFilepath = "\"" + logsStorageDirpath + "{{ enclave_uuid }}/{{ service_uuid }}.json\""
configFileTemplateName = "vectorConfigFileTemplate"
// Note: we set buffer to block so that we don't drop any logs, however this could apply backpressure up the topology
// if we start noticing slowdown due to vector buffer blocking, we might want to revisit our architecture
configFileTemplate = `
[sources.{{ .Source.Id }}]
type = {{ .Source.Type }}
address = "{{ .Source.Address }}"
[sinks.{{ .Sink.Id }}]
type = {{ .Sink.Type }}
inputs = {{ .Sink.Inputs }}
path = {{ .Sink.Filepath }}
encoding.codec = "json"
buffer.when_full = "block"
`
////////////////////////--FINISH--VECTOR CONFIGURATION SECTION--/////////////////////////////
)