Skip to content

Commit

Permalink
fix: add back processors
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoutsovasilis committed Oct 29, 2024
1 parent 7ddffe4 commit cd1fcc4
Show file tree
Hide file tree
Showing 7 changed files with 228 additions and 6 deletions.
37 changes: 37 additions & 0 deletions deploy/helm/elastic-agent/examples/eck/rendered/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,43 @@ stringData:
stream: all
paths:
- /var/log/containers/*${kubernetes.container.id}.log
processors:
- add_fields:
fields:
annotations.elastic_co/dataset: ${kubernetes.annotations.elastic.co/dataset|""}
annotations.elastic_co/namespace: ${kubernetes.annotations.elastic.co/namespace|""}
annotations.elastic_co/preserve_original_event: ${kubernetes.annotations.elastic.co/preserve_original_event|""}
target: kubernetes
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/dataset
ignore_missing: true
when:
equals:
kubernetes.annotations.elastic_co/dataset: ""
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/namespace
ignore_missing: true
when:
equals:
kubernetes.annotations.elastic_co/namespace: ""
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/preserve_original_event
ignore_missing: true
when:
equals:
kubernetes.annotations.elastic_co/preserve_original_event: ""
- add_tags:
tags:
- preserve_original_event
when:
and:
- has_fields:
- kubernetes.annotations.elastic_co/preserve_original_event
- regexp:
kubernetes.annotations.elastic_co/preserve_original_event: ^(?i)true$
prospector.scanner.symlinks: true
type: filestream
use_output: default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,43 @@ stringData:
stream: all
paths:
- /var/log/containers/*${kubernetes.container.id}.log
processors:
- add_fields:
fields:
annotations.elastic_co/dataset: ${kubernetes.annotations.elastic.co/dataset|""}
annotations.elastic_co/namespace: ${kubernetes.annotations.elastic.co/namespace|""}
annotations.elastic_co/preserve_original_event: ${kubernetes.annotations.elastic.co/preserve_original_event|""}
target: kubernetes
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/dataset
ignore_missing: true
when:
equals:
kubernetes.annotations.elastic_co/dataset: ""
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/namespace
ignore_missing: true
when:
equals:
kubernetes.annotations.elastic_co/namespace: ""
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/preserve_original_event
ignore_missing: true
when:
equals:
kubernetes.annotations.elastic_co/preserve_original_event: ""
- add_tags:
tags:
- preserve_original_event
when:
and:
- has_fields:
- kubernetes.annotations.elastic_co/preserve_original_event
- regexp:
kubernetes.annotations.elastic_co/preserve_original_event: ^(?i)true$
prospector.scanner.symlinks: true
type: filestream
use_output: default
Expand Down Expand Up @@ -1052,7 +1089,7 @@ spec:
labels:
name: agent-pernode-example
annotations:
checksum/config: 6f17f113f90d08acea46c377cf6542336fba6948fc65d31f67530d80a965bb3f
checksum/config: 53aa4ccc3e8557125fecf738e70722e2aaa1199ee79a823f684a9d4a296af7b0

spec:
dnsPolicy: ClusterFirstWithHostNet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,43 @@ stringData:
stream: all
paths:
- /var/log/containers/*${kubernetes.container.id}.log
processors:
- add_fields:
fields:
annotations.elastic_co/dataset: ${kubernetes.annotations.elastic.co/dataset|""}
annotations.elastic_co/namespace: ${kubernetes.annotations.elastic.co/namespace|""}
annotations.elastic_co/preserve_original_event: ${kubernetes.annotations.elastic.co/preserve_original_event|""}
target: kubernetes
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/dataset
ignore_missing: true
when:
equals:
kubernetes.annotations.elastic_co/dataset: ""
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/namespace
ignore_missing: true
when:
equals:
kubernetes.annotations.elastic_co/namespace: ""
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/preserve_original_event
ignore_missing: true
when:
equals:
kubernetes.annotations.elastic_co/preserve_original_event: ""
- add_tags:
tags:
- preserve_original_event
when:
and:
- has_fields:
- kubernetes.annotations.elastic_co/preserve_original_event
- regexp:
kubernetes.annotations.elastic_co/preserve_original_event: ^(?i)true$
prospector.scanner.symlinks: true
type: filestream
use_output: default
Expand Down Expand Up @@ -1054,7 +1091,7 @@ spec:
labels:
name: agent-pernode-example
annotations:
checksum/config: a0992804c5782a0f4c3b4eeae610ff3d222fc7f3e219658cf9787fbe4e5202f1
checksum/config: 21fb7e317577410096de8d8e0fb03b32ad2e406b549f75085ae6907d38678e46

spec:
dnsPolicy: ClusterFirstWithHostNet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,43 @@ stringData:
stream: all
paths:
- /var/log/containers/*${kubernetes.container.id}.log
processors:
- add_fields:
fields:
annotations.elastic_co/dataset: ${kubernetes.annotations.elastic.co/dataset|""}
annotations.elastic_co/namespace: ${kubernetes.annotations.elastic.co/namespace|""}
annotations.elastic_co/preserve_original_event: ${kubernetes.annotations.elastic.co/preserve_original_event|""}
target: kubernetes
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/dataset
ignore_missing: true
when:
equals:
kubernetes.annotations.elastic_co/dataset: ""
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/namespace
ignore_missing: true
when:
equals:
kubernetes.annotations.elastic_co/namespace: ""
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/preserve_original_event
ignore_missing: true
when:
equals:
kubernetes.annotations.elastic_co/preserve_original_event: ""
- add_tags:
tags:
- preserve_original_event
when:
and:
- has_fields:
- kubernetes.annotations.elastic_co/preserve_original_event
- regexp:
kubernetes.annotations.elastic_co/preserve_original_event: ^(?i)true$
prospector.scanner.symlinks: true
type: filestream
use_output: default
Expand Down Expand Up @@ -190,7 +227,7 @@ spec:
labels:
name: agent-pernode-example
annotations:
checksum/config: eccba05d4529b7e88754b86e1d7f671436f99a9968e0df202730569e2bd31816
checksum/config: 4de2216224a483ae1355aeec668894f764edc48bd3481d8fbc65f67eedc1b336

spec:
dnsPolicy: ClusterFirstWithHostNet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,43 @@ stringData:
stream: all
paths:
- /var/log/containers/*${kubernetes.container.id}.log
processors:
- add_fields:
fields:
annotations.elastic_co/dataset: ${kubernetes.annotations.elastic.co/dataset|""}
annotations.elastic_co/namespace: ${kubernetes.annotations.elastic.co/namespace|""}
annotations.elastic_co/preserve_original_event: ${kubernetes.annotations.elastic.co/preserve_original_event|""}
target: kubernetes
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/dataset
ignore_missing: true
when:
equals:
kubernetes.annotations.elastic_co/dataset: ""
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/namespace
ignore_missing: true
when:
equals:
kubernetes.annotations.elastic_co/namespace: ""
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/preserve_original_event
ignore_missing: true
when:
equals:
kubernetes.annotations.elastic_co/preserve_original_event: ""
- add_tags:
tags:
- preserve_original_event
when:
and:
- has_fields:
- kubernetes.annotations.elastic_co/preserve_original_event
- regexp:
kubernetes.annotations.elastic_co/preserve_original_event: ^(?i)true$
prospector.scanner.symlinks: true
type: filestream
use_output: default
Expand Down Expand Up @@ -1080,7 +1117,7 @@ spec:
labels:
name: agent-pernode-example
annotations:
checksum/config: a0992804c5782a0f4c3b4eeae610ff3d222fc7f3e219658cf9787fbe4e5202f1
checksum/config: 21fb7e317577410096de8d8e0fb03b32ad2e406b549f75085ae6907d38678e46

spec:
dnsPolicy: ClusterFirstWithHostNet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,43 @@ Config input for container logs
stream: {{ dig "vars" "stream" "all" .Values.kubernetes.containers.logs }}
format: {{ dig "vars" "format" "auto" .Values.kubernetes.containers.logs }}
{{- with $.Values.kubernetes.containers.logs.additionalParsersConfig }}
{{- . | toYaml | nindent 6 }}
{{ . | toYaml | nindent 6 }}
{{- end }}
processors:
- add_fields:
target: kubernetes
fields:
annotations.elastic_co/dataset: '${kubernetes.annotations.elastic.co/dataset|""}'
annotations.elastic_co/namespace: '${kubernetes.annotations.elastic.co/namespace|""}'
annotations.elastic_co/preserve_original_event: '${kubernetes.annotations.elastic.co/preserve_original_event|""}'
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/dataset
when:
equals:
kubernetes.annotations.elastic_co/dataset: ''
ignore_missing: true
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/namespace
when:
equals:
kubernetes.annotations.elastic_co/namespace: ''
ignore_missing: true
- drop_fields:
fields:
- kubernetes.annotations.elastic_co/preserve_original_event
when:
equals:
kubernetes.annotations.elastic_co/preserve_original_event: ''
ignore_missing: true
- add_tags:
tags:
- preserve_original_event
when:
and:
- has_fields:
- kubernetes.annotations.elastic_co/preserve_original_event
- regexp:
kubernetes.annotations.elastic_co/preserve_original_event: ^(?i)true$
{{- end -}}
2 changes: 1 addition & 1 deletion deploy/helm/elastic-agent/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
"additionalParsersConfig": {
"type": "array",
"items": {
"type": "string"
"type": "object"
}
}
},
Expand Down

0 comments on commit cd1fcc4

Please sign in to comment.