elastic / elastic/elastic-agent
Support disabling global metadata processors per output
- Dominant language
- Go
- Stars
- 275
- Forks
- 264
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 312
Description
- Relates https://github.com/elastic/elastic-agent/issues/12267
- Relates https://github.com/elastic/elastic-agent/pull/12945
https://github.com/elastic/elastic-agent/pull/12945 added the ability to configure per output global processors, while https://github.com/elastic/elastic-agent/issues/12267 added the ability to globally disable the default add_x_metadata processors.
We should additionally allow disabling the default global processors per output, and simplify the configuration to allow disabling only specific global processors as a convenience. Users who want to directly configure the global processors can disable them and re-add them as global processors.
One major advantage of adding the ability to disable global processors per output is this feature will immediately become available to Fleet users via advanced YAML parameters while we build a proper UI for this.
The default processors feature flag should be extended to support entries per global add_x_metadata processor:
```yaml
agent.features:
default_processors:
enabled: true # when false disables all default processors everywhere
add_host_metadata: false # Disable add_host_metadata everywhere
add_cloud_metadata: false # Disable add_cloud_metadata everywhere
add_docker_metadata: false # Disable add_docker_metadata everywhere
add_kubernetes_metadata: false # add_kubernetes_metadata everywhere
```
The `default_processors` block should be additionally be supported in each output in addition to the global option:
```yaml
outputs:
default:
type: elasticsearch
hosts:
- localhost:9200
username: elastic
password: [REDACTED]
default_processors: # NEW
enabled: true # when false disables all default processors everywhere
add_host_metadata: false # Disable add_host_metadata everywhere
add_cloud_metadata: false # Disable add_cloud_metadata everywhere
add_docker_metadata: false # Disable add_docker_metadata everywhere
add_kubernetes_metadata: false # add_kubernetes_metadata everywhere
```
Contributor guide
Assessment
This issue has not been assessed yet.