From 50f841c08fc159440eee8cbd6e2f22f63d25de9a Mon Sep 17 00:00:00 2001 From: MattGrundy <38431311+MattGrundy@users.noreply.github.com> Date: Fri, 21 Jun 2024 16:51:48 +0100 Subject: [PATCH] addition of an optional log aggregation --- etc/vector/vector.d/90-output.toml.tmpl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/etc/vector/vector.d/90-output.toml.tmpl b/etc/vector/vector.d/90-output.toml.tmpl index 028e046..54554b7 100644 --- a/etc/vector/vector.d/90-output.toml.tmpl +++ b/etc/vector/vector.d/90-output.toml.tmpl @@ -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