Inject Beat specific default processors#34149
Conversation
|
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
|
|
||
| // 3. stream processors | ||
| streamSource, err = injectStreamProcessors(raw, inputType, stream, streamSource) | ||
| streamSource, err = injectStreamProcessors(raw, inputType, stream, streamSource, defaultProcessors) |
There was a problem hiding this comment.
There is this above:
// 1. global processors
streamSource = injectGlobalProcesssors(raw, streamSource)The metadata processors behave more like global processors don't they? Shouldn't they be added there?
Both prepend and append are used here to control the order so just reading this code it is a bit tricky to follow what ends up where.
Could you post an example beat-rendered-config if you have one from diagnostics with this change?
There was a problem hiding this comment.
yes but if you check the final order of the processors it's
// now the order of the processors on this input is as follows
// 1. stream processors
// 2. agentInfo processors
// 3. global processors
// 4. stream specific processors
so if we put it with global, they will be pushed to later stage by next 2 steps. this is why i went with stream
- it makes sure it's first
- it makes clear that it will be part of the stream
| @@ -1,11 +0,0 @@ | |||
| # Module: enterprisesearch | |||
There was a problem hiding this comment.
This file was committed by mistake I think, I see this come in when changing branches occasionally.
There was a problem hiding this comment.
yep probably changing branches
|
Just a heads up, I'm running into some weird behaviors with the processors under elastic-agent. They seem to be putting the beat in some kind of wedged state where elastic-agent won't actually stop when it gets a sigint. I can't manually remove the processors either, but commenting out the |
|
Thanks. FYI the default processors aren't new, they would have been configured in a different way prior to 8.6 (reading the default beat config file at startup) but they would have been running regardless. |
Inject Beat specific default processors (#34149)



What does this PR do?
Managed beats do not respect default processors configured in
{beat}.ymlfile.This results in events without host, k8s or docker metadata.
In this PR we take default processors from config file to callback responsible for handling configuration passed from agent and make sure they are included during
generatestep.Why is it important?
Missing metadata may break dashboards
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Fixes: #34125