Skip to content

Commit

Permalink
Remove add_docker_metadata from Functionbeat configuration (#14424) (#…
Browse files Browse the repository at this point in the history
…14480)

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.
(cherry picked from commit d9a4c9c)
  • Loading branch information
kvch committed Nov 22, 2019
1 parent f6b50a9 commit eb0f988
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions dev-tools/mage/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
3 changes: 2 additions & 1 deletion libbeat/_meta/config.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ output.elasticsearch:
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
{{- if .UseDockerMetadataProcessor }}
- add_docker_metadata: ~{{ end }}

{{- if .UseKubernetesMetadataProcessor }}
- add_kubernetes_metadata: ~
Expand Down
1 change: 0 additions & 1 deletion x-pack/functionbeat/functionbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ output.elasticsearch:
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~

#================================ Logging =====================================

Expand Down
9 changes: 5 additions & 4 deletions x-pack/functionbeat/scripts/mage/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
}
}

0 comments on commit eb0f988

Please sign in to comment.