From d9a4c9c240a9820fab15002592e5bb6db318543b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Tue, 12 Nov 2019 13:15:43 +0100 Subject: [PATCH] Remove add_docker_metadata from Functionbeat configuration (#14424) The PR #13374 adds `add_docker_metadata` for all Beats. However, this results in the following error in Functionbeat when deployed to AWS: ``` Exiting: error initializing processors: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? ``` Thus, the function fails to start and process messages. This PR removes the processor from the configuration of Functionbeat. So the function is able to start with the default processor configuration. --- dev-tools/mage/config.go | 1 + libbeat/_meta/config.yml.tmpl | 3 ++- x-pack/functionbeat/functionbeat.yml | 1 - x-pack/functionbeat/scripts/mage/config.go | 9 +++++---- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dev-tools/mage/config.go b/dev-tools/mage/config.go index 40aa94a083c..724970d87ae 100644 --- a/dev-tools/mage/config.go +++ b/dev-tools/mage/config.go @@ -115,6 +115,7 @@ func Config(types ConfigFileType, args ConfigFileParams, targetDir string) error "ExcludeLogstash": false, "ExcludeRedis": false, "UseObserverProcessor": false, + "UseDockerMetadataProcessor": true, "UseKubernetesMetadataProcessor": false, "ExcludeDashboards": false, } diff --git a/libbeat/_meta/config.yml.tmpl b/libbeat/_meta/config.yml.tmpl index f1cb5010896..6278ae44a2b 100644 --- a/libbeat/_meta/config.yml.tmpl +++ b/libbeat/_meta/config.yml.tmpl @@ -96,7 +96,8 @@ output.elasticsearch: processors: - add_host_metadata: ~ - add_cloud_metadata: ~ - - add_docker_metadata: ~ +{{- if .UseDockerMetadataProcessor }} + - add_docker_metadata: ~{{ end }} {{- if .UseKubernetesMetadataProcessor }} - add_kubernetes_metadata: ~ diff --git a/x-pack/functionbeat/functionbeat.yml b/x-pack/functionbeat/functionbeat.yml index 589bd914c68..b51ca4916f6 100644 --- a/x-pack/functionbeat/functionbeat.yml +++ b/x-pack/functionbeat/functionbeat.yml @@ -347,7 +347,6 @@ output.elasticsearch: processors: - add_host_metadata: ~ - add_cloud_metadata: ~ - - add_docker_metadata: ~ #================================ Logging ===================================== diff --git a/x-pack/functionbeat/scripts/mage/config.go b/x-pack/functionbeat/scripts/mage/config.go index ca9f4617327..dae9ba373b8 100644 --- a/x-pack/functionbeat/scripts/mage/config.go +++ b/x-pack/functionbeat/scripts/mage/config.go @@ -20,10 +20,11 @@ func XPackConfigFileParams() devtools.ConfigFileParams { devtools.LibbeatDir("_meta/config.reference.yml.tmpl"), }, ExtraVars: map[string]interface{}{ - "ExcludeConsole": true, - "ExcludeFileOutput": true, - "ExcludeKafka": true, - "ExcludeRedis": true, + "ExcludeConsole": true, + "ExcludeFileOutput": true, + "ExcludeKafka": true, + "ExcludeRedis": true, + "UseDockerMetadataProcessor": false, }, } }