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

Fix tags for coredns/envoyproxy #19134

Merged
Changes from all 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
Fix tags for coredns/envoyproxy
When {{ .tags }} is evaluated in the module config it not written in the correct format.
This fixes that issue and also conditionally enables `publisher_pipeline.disable_host`
based on whether tags contains `forwarded` to be consistent with every other module
that allows for `var.tags` to be set (relates: #13920).

For example (https://play.golang.org/p/LUr-X94msd1):

    var.tags: [foo, bar]

will be written into the config as

    tags: [foo bar]

which is a single value array containing the string "foo bar" rather than two tags.
andrewkroh committed Jun 11, 2020
commit 940d6855604166930d597722e454f5161c99b2d2
2 changes: 2 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
@@ -43,6 +43,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
* Checkpoint {pull}18754[18754]
* Netflow {pull}19087[19087]
* Suricata {pull}19107[19107] (`forwarded` tag is not included by default)
* CoreDNS {pull}19134[19134] (`forwarded` tag is not included by default)
* Envoy Proxy {pull}19134[19134] (`forwarded` tag is not included by default)
- Preserve case of http.request.method. ECS prior to 1.6 specified normalizing to lowercase, which lost information. Affects filesets: apache/access, elasticsearch/audit, iis/access, iis/error, nginx/access, nginx/ingress_controller, aws/elb, suricata/eve, zeek/http. {issue}18154[18154] {pull}18359[18359]
- Adds check on `<no value>` config option value for the azure input `resource_manager_endpoint`. {pull}18890[18890]
- Okta module now requires objects instead of JSON strings for the `http_headers`, `http_request_body`, `pagination`, `rate_limit`, and `ssl` variables. {pull}18953[18953]
3 changes: 2 additions & 1 deletion x-pack/filebeat/module/coredns/log/config/coredns.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,8 @@ paths:
{{ range $i, $path := .paths }}
- {{$path}}
{{ end }}
tags: {{.tags}}
tags: {{.tags | tojson}}
publisher_pipeline.disable_host: {{ inList .tags "forwarded" }}
processors:
- add_fields:
target: ''
3 changes: 2 additions & 1 deletion x-pack/filebeat/module/envoyproxy/log/config/envoyproxy.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,8 @@ paths:
{{ range $i, $path := .paths }}
- {{$path}}
{{ end }}
tags: {{.tags}}
tags: {{.tags | tojson}}
publisher_pipeline.disable_host: {{ inList .tags "forwarded" }}
processors:
- add_fields:
target: ''