-
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
Add new agentbeat with all beats shipped with Elastic Agent as a single beat #38183
Conversation
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
❕ Build Aborted
Expand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures> Show only the first 10 test failures
|
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.
That looks great @blakerouse !
Did you measure the disk savings? It would be nice to have it in the PR/Commit.
Do any of the fields change when you ingest events with agentbeat? I'm noticing some name changes in monitoring, input, and module names and I'm curious if that changes the emitted events in any way. |
700M - combined total for auditbeat, filebeat, heartbeat, metricbeat, osquerybeat, packetbeat 493M in savings a reduction of 70% for just those beats. Note: This was done on darwin/arm64. Each OS/arch will have a different result, but it should be in proportion. |
@leehinman That is a great question, I had to adjust the auditbeat system module name to There is also an adjustment in the internal metrics reported for the beats, but its only for the name of the key for the running modules, and inputs. I don't believe this will have any affect, other than for debugging. |
💚 Build Succeeded
History
cc @blakerouse |
💚 Build Succeeded
History
cc @blakerouse |
💔 Build Failed
Failed CI StepsHistory
cc @blakerouse |
💚 Build Succeeded
History
cc @blakerouse |
💚 Build Succeeded
History
cc @blakerouse |
Are we going to merge it soon? Or can use this branch to create the pipeline? |
@andrewkroh I was able to adjust agentbeat and each of the beats to only register what each need. You will see the addition of This change ensures that processors will not cross other beats, adjustments to kuberentes/docker processors will only take affect for each beat. Another change is that |
@pazone I am waiting on a green CI and then I will get this merged so the PR for building can be created. |
@@ -37,13 +37,6 @@ import ( | |||
"github.com/elastic/elastic-agent-libs/mapstr" | |||
) | |||
|
|||
func init() { |
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.
So we can't use init()
anymore without side effects for agentbeat?
I don't mind it, but this seems like something that will be forgotten or undone without some kind of automated enforcement.
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.
Correct, caution will need to be taken in the case that a beat is modifying a behavior that is coming from libbeat.
If the change can bleed into another beat then you need to use InitializeModule, otherwise init can be used.
Like init is still being used in most places, but only the areas where it can cause an effect was it changed to InitializeModule.
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.
It is also really hard to enforce with automation, because its conditional if it is required. It all depends on the context of the change.
It applied to anything that is modifying a behavior that is coming from libbeat or x-pack/libbeat.
All tests pass that are run by Jenkins, this is ready to be merged if okay with the implementation and change. @pazone Is blocked on getting this merged to create the packaging job. |
Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform) |
Pinging @elastic/sec-deployment-and-devices (Team:Security-Deployment and Devices) |
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.
Assume it exists, can someone please point me at the buildkite job that periodically runs all Fleet integrations' system tests using the latest elastic-agent snapshot. I want to keep any on that as soon as this become available in a 8.14.0-SNAPSHOT.
Might be this one https://buildkite.com/elastic/elastic-package-test-with-integrations. |
Merging this PR on its own isn't enough to update the agent build so you won't see any impact yet. |
Merging so we can get the build pipeline and additional validation started. |
That pointed me in the right direction. I think it is this one. But we don't have any testing with the next snapshot. https://buildkite.com/elastic/integrations-schedule-daily/builds/169 |
PR for packaging - #38880 |
If your looking for an early build artifact - https://buildkite.com/elastic/beats-xpack-agentbeat-package/builds/17#018ed2c8-b857-429e-9d5c-f38f264fcc14 |
So this binary will fulfil the capabilities to implement the inputs of integrations? |
Yes, it is all of the Beats agent currently runs compiled into a single binary, with the individual beats accessible via sub-commands e.g
I am confident we don't have 100% test coverage for every feature of every integration, however the scope of what can go wrong with this change should be limited to interactions between the global state of each Beat. There are not many things in this category, most of them have been raised in this PR already. There are always unknown unknowns of course. |
PR to begin system testing with 8.14.0-SNAPSHOT for all integrations on buildkite: elastic/integrations#9585 |
filebeat: update build relates to elastic/beats#38183 Signed-off-by: Rui Chen <[email protected]>
Proposed commit message
Add a new agentbeat that compiles into a single binary that provides subcommands for each contained beat. Contains auditbeat, filebeat, heartbeat, metricbeat, osquerybeat, and packetbeat.
Checklist
[ ] I have added an entry inbeing this is just a combined beat, don't think we need to add a changelog for it (it just gets all the changes the other beats get)CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Related issues
Use cases
Provides a much smaller binary when all of the beats are combined into a single binary instead of each in there own binary.