-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inject Beat specific default processors #34149
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) |
@@ -94,7 +94,7 @@ func CreateInputsFromStreams(raw *proto.UnitExpectedConfig, inputType string, ag | |||
} | |||
|
|||
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks.
@@ -1,11 +0,0 @@ | |||
# Module: enterprisesearch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was committed by mistake I think, I see this come in when changing branches occasionally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep probably changing branches
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Inject Beat specific default processors (#34149) (cherry picked from commit 75ebd50) Co-authored-by: Michal Pristas <[email protected]>
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}.yml
file.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
generate
step.Why is it important?
Missing metadata may break dashboards
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Fixes: #34125