Skip to content

Commit

Permalink
switch providers to log in json in vector config (#1522)
Browse files Browse the repository at this point in the history
  • Loading branch information
goastler authored Nov 14, 2024
1 parent be4f8e1 commit d9b0130
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions docker/images/vector/vector.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,11 @@ include_labels = ["vector.provider=true"]
type = "remap"
inputs = ["provider"]
source = '''
.host="$OO_HOST"
del(.container_created_at)
del(.container_id)
del(.host)
del(.image)
del(.label)
del(.source_type)
del(.stream)
.=parse_json!(string!(.message))
del(.message)
del(.timestamp)
del(._timestamp)
.host="$OO_HOST"
'''

# print to console the provider logs
Expand Down Expand Up @@ -70,7 +66,6 @@ source = '''
.host="$OO_HOST"
del(.id)
del(.from)
del(.host)
del(.Type)
.name=.Actor.Attributes.name
del(.Actor)
Expand All @@ -79,6 +74,7 @@ del(.time)
del(.timeNano)
del(.source_type)
del(.timestamp)
del(._timestamp)
'''

# print docker events to console
Expand Down Expand Up @@ -111,6 +107,8 @@ inputs = ["caddy"]
source = '''
.=parse_json!(string!(.message))
.host="$OO_HOST"
del(.timestamp)
del(._timestamp)
del(.ts)
del(.user_id)
del(.size)
Expand Down Expand Up @@ -144,6 +142,7 @@ source = '''
.host="$OO_HOST"
del(.t)
del(.id)
del(.timestamp)
del(._timestamp)
'''

Expand Down

0 comments on commit d9b0130

Please sign in to comment.