Skip to content

Commit

Permalink
addition of an optional log aggregation
Browse files Browse the repository at this point in the history
  • Loading branch information
MattGrundy committed Jul 18, 2024
1 parent da6bb2f commit 50f841c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions etc/vector/vector.d/90-output.toml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@ source = '''
'''
{{end}}

{{if conv.ToBool (getenv "DESKPRO_LOG_AGGREGATION" "false")}}
[transforms.aggregate_deskpro_logs]
type = "filter"
inputs = ["all_formatted"]
condition = ".app == \"deskpro*\""

[sinks.out_file]
type = "file"
inputs = ["aggregate_deskpro_logs"]
path="{{getenv "LOGS_EXPORT_DIR"}}/deskpro_logs.log"

{{end}}

{{if eq "dir" (getenv "LOGS_EXPORT_TARGET") }}
{{if eq (getenv "LOGS_EXPORT_DIR") "/dev/null" }}
# LOGS_EXPORT_DIR=/dev/null
Expand Down

0 comments on commit 50f841c

Please sign in to comment.