generated from danthegoodman1/NodeExpressRemixTemplate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
vector.yaml
48 lines (43 loc) · 851 Bytes
/
vector.yaml
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
api:
enabled: true
address: 127.0.0.1:8686
sources:
docker:
type: docker_logs
transforms:
drop_self:
type: filter
inputs:
- docker
condition: .container_name != "vector"
setlevel:
type: remap
inputs:
- drop_self
source: |-
.temp, err = parse_json(.message)
if err != null {
.json_parse_err = err
.level = "other"
} else {
if !exists(.temp.level) {
.level = "other"
} else {
.level = .temp.level
}
if exists(.temp.message) {
.og_message = .message
.message = .temp.message
}
if exists(.temp.err) {
.error = .temp.err
}
del(.temp)
}
sinks:
axiom:
type: axiom
inputs:
- "setlevel"
dataset: projects
token: ${AXIOM_TOKEN}