-
Notifications
You must be signed in to change notification settings - Fork 203
Description
Edited by @cmacknz to generalize to all add_x_metadata processors and include the suggested approach from #4670 (comment)
Describe the enhancement:
The default set of processors for each Beat, when they are started by agent, is defined in the code and is not configurable. Here is the definition for Metricbeat. Same default config stands for rest of beats.
For example the add_kubernetes_metadata processor is used to enrich kubernetes events with extra metadata fields. This results in the number of k8s API calls being proportional to the number of inputs in the agent policy. In this case the same functionality is also present through enrichers and start by default in code of beats as described here-see enrichers.
This enhancement will allow disabling or configuring any of the default beat global processors. This will be done by defining a new type of provider , an event_data provider, which controls the behavior of the event metadata processors added by each beat.
We will additionally expose the entire contents of the providers section of the agent policy in Fleet to allow configuring this. Here is a sample of the intended configuration:
providers:
event_metadata:
# The default value would be true to avoid a breaking change when they aren't specified.
host: # controls add_host_metadata
enabled: true
kubernetes: # controls add_kubernetes_metadata
enabled: false
cloud: # controls add_cloud_metadata
enabled: true
docker: # controls add_docker_metadata
enabled: falseDescribe a specific use case for the enhancement or feature:
All the elastic-agent Kubernetes deployments experience the default enablement of processor in the background, which can be "expensive" (as far as extra memory and number of API calls) that the agent has to do, especially in big Kubernetes deployments
Related Issues:
- Investigate deployment and cronjob enrichement integrations#8176
- https://github.com/elastic/sdh-beats/issues/3863
Definition of Done:
- Allow disabling the add_kubernetes_metadata processor for all Beats run by Elastic Agent.
- Provide tests that showcase the same functionality and enrichment with/without processor enabled
- Demonstrate the event metadata processors can be disabled from Fleet.
- Document the new functionality