Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add condition to the config file template for add_kubernetes_metadata #14056

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Use less restrictive API to check if template exists. {pull}13847[13847]
- Do not check for alias when setup.ilm.check_exists is false. {pull}13848[13848]
- Add support for numeric time zone offsets in timestamp processor. {pull}13902[13902]
- Add condition to the config file template for add_kubernetes_metadata {pull}14056[14056]

*Auditbeat*

Expand Down
1 change: 0 additions & 1 deletion auditbeat/auditbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~

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

Expand Down
23 changes: 12 additions & 11 deletions dev-tools/mage/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,18 @@ func Config(types ConfigFileType, args ConfigFileParams, targetDir string) error
}

params := map[string]interface{}{
"GOOS": EnvOr("DEV_OS", "linux"),
"GOARCH": EnvOr("DEV_ARCH", "amd64"),
"Reference": false,
"Docker": false,
"ExcludeConsole": false,
"ExcludeFileOutput": false,
"ExcludeKafka": false,
"ExcludeLogstash": false,
"ExcludeRedis": false,
"UseObserverProcessor": false,
"ExcludeDashboards": false,
"GOOS": EnvOr("DEV_OS", "linux"),
"GOARCH": EnvOr("DEV_ARCH", "amd64"),
"Reference": false,
"Docker": false,
"ExcludeConsole": false,
"ExcludeFileOutput": false,
"ExcludeKafka": false,
"ExcludeLogstash": false,
"ExcludeRedis": false,
"UseObserverProcessor": false,
"UseKubernetesMetadataProcessor": false,
"ExcludeDashboards": false,
}
for k, v := range args.ExtraVars {
params[k] = v
Expand Down
3 changes: 3 additions & 0 deletions filebeat/scripts/mage/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ func configFileParams(moduleDirs ...string) devtools.ConfigFileParams {
devtools.OSSBeatDir("_meta/beat.docker.yml"),
devtools.LibbeatDir("_meta/config.docker.yml"),
},
ExtraVars: map[string]interface{}{
"UseKubernetesMetadataProcessor": true,
},
}
}

Expand Down
1 change: 0 additions & 1 deletion journalbeat/journalbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~

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

Expand Down
4 changes: 4 additions & 0 deletions libbeat/_meta/config.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~

{{- if .UseKubernetesMetadataProcessor }}
- add_kubernetes_metadata: ~
{{- else -}}
{{ end }}
{{else}}
processors:
- add_observer_metadata:
Expand Down
3 changes: 3 additions & 0 deletions metricbeat/scripts/mage/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ func configFileParams(moduleDirs ...string) devtools.ConfigFileParams {
devtools.OSSBeatDir("_meta/beat.docker.yml"),
devtools.LibbeatDir("_meta/config.docker.yml"),
},
ExtraVars: map[string]interface{}{
"UseKubernetesMetadataProcessor": true,
},
}
}

Expand Down
1 change: 0 additions & 1 deletion packetbeat/packetbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~

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

Expand Down
1 change: 0 additions & 1 deletion winlogbeat/winlogbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~

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

Expand Down
1 change: 0 additions & 1 deletion x-pack/auditbeat/auditbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~

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

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 @@ -345,7 +345,6 @@ processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~

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

Expand Down
1 change: 0 additions & 1 deletion x-pack/winlogbeat/winlogbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~

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

Expand Down