Skip to content

Commit b48c388

Browse files
authored
Fix tags for coredns/envoyproxy (#19134)
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.
1 parent 59b133e commit b48c388

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG.next.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
4545
* Netflow {pull}19087[19087]
4646
* Zeek {pull}19113[19113] (`forwarded` tag is not included by default)
4747
* Suricata {pull}19107[19107] (`forwarded` tag is not included by default)
48+
* CoreDNS {pull}19134[19134] (`forwarded` tag is not included by default)
49+
* Envoy Proxy {pull}19134[19134] (`forwarded` tag is not included by default)
4850
- 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]
4951
- Adds check on `<no value>` config option value for the azure input `resource_manager_endpoint`. {pull}18890[18890]
5052
- 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]

x-pack/filebeat/module/coredns/log/config/coredns.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ paths:
33
{{ range $i, $path := .paths }}
44
- {{$path}}
55
{{ end }}
6-
tags: {{.tags}}
6+
tags: {{.tags | tojson}}
7+
publisher_pipeline.disable_host: {{ inList .tags "forwarded" }}
78
processors:
89
- add_fields:
910
target: ''

x-pack/filebeat/module/envoyproxy/log/config/envoyproxy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ paths:
33
{{ range $i, $path := .paths }}
44
- {{$path}}
55
{{ end }}
6-
tags: {{.tags}}
6+
tags: {{.tags | tojson}}
7+
publisher_pipeline.disable_host: {{ inList .tags "forwarded" }}
78
processors:
89
- add_fields:
910
target: ''

0 commit comments

Comments
 (0)