From 9aa6ef99feaa23e83ebef411b54f708667273b87 Mon Sep 17 00:00:00 2001 From: Alex K <8418476+fearful-symmetry@users.noreply.github.com> Date: Thu, 23 Jan 2020 18:57:10 -0800 Subject: [PATCH] Cherry-pick #15719 to 7.6: [Elastic Log Driver] Add redis and kafka outputs (#15778) * [Elastic Log Driver] Add redis and kafka outputs (#15719) * add redis and kafka out * add cloud output * add changelog (cherry picked from commit 18203697f0010cc50fcceda5a4a43605b5869639) * fix changelog --- CHANGELOG.next.asciidoc | 1 + x-pack/dockerlogbeat/main.go | 2 ++ x-pack/dockerlogbeat/pipelinemanager/libbeattools.go | 8 ++++++++ 3 files changed, 11 insertions(+) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 6ebdb3958b4..e2110fc157f 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -38,6 +38,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d *Affecting all Beats* +- Fix missing output in dockerlogbeat {pull}15719[15719] *Auditbeat* diff --git a/x-pack/dockerlogbeat/main.go b/x-pack/dockerlogbeat/main.go index d60a12cbece..d763126f2dc 100644 --- a/x-pack/dockerlogbeat/main.go +++ b/x-pack/dockerlogbeat/main.go @@ -15,7 +15,9 @@ import ( _ "github.com/elastic/beats/libbeat/outputs/console" _ "github.com/elastic/beats/libbeat/outputs/elasticsearch" _ "github.com/elastic/beats/libbeat/outputs/fileout" + _ "github.com/elastic/beats/libbeat/outputs/kafka" _ "github.com/elastic/beats/libbeat/outputs/logstash" + _ "github.com/elastic/beats/libbeat/outputs/redis" _ "github.com/elastic/beats/libbeat/publisher/queue/memqueue" _ "github.com/elastic/beats/libbeat/publisher/queue/spool" "github.com/elastic/beats/libbeat/service" diff --git a/x-pack/dockerlogbeat/pipelinemanager/libbeattools.go b/x-pack/dockerlogbeat/pipelinemanager/libbeattools.go index 04caca748db..e6ff0d8dbf7 100644 --- a/x-pack/dockerlogbeat/pipelinemanager/libbeattools.go +++ b/x-pack/dockerlogbeat/pipelinemanager/libbeattools.go @@ -15,6 +15,7 @@ import ( yaml "gopkg.in/yaml.v2" "github.com/elastic/beats/libbeat/beat" + "github.com/elastic/beats/libbeat/cloudid" "github.com/elastic/beats/libbeat/common" "github.com/elastic/beats/libbeat/idxmgmt" "github.com/elastic/beats/libbeat/logp" @@ -67,6 +68,13 @@ func loadNewPipeline(logOptsConfig map[string]string, name string, log *logp.Log if err != nil { return nil, err } + + // Attach CloudID config if needed + err = cloudid.OverwriteSettings(cfg) + if err != nil { + return nil, errors.Wrap(err, "Error creating CloudID") + } + config := containerConfig{} err = cfg.Unpack(&config) if err != nil {