-
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
[Elastic Agent] Add support for synthetics inputs that run heartbeat #20387
Conversation
@@ -523,7 +523,7 @@ func packageAgent(requiredPackages []string, packagingFn func()) { | |||
defer os.RemoveAll(dropPath) | |||
defer os.Unsetenv(agentDropPath) | |||
|
|||
packedBeats := []string{"filebeat", "metricbeat"} | |||
packedBeats := []string{"filebeat", "heartbeat", "metricbeat"} |
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.
@blakerouse Do we directly have to bundle it to play around with it or would download work?
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.
@ruflin We do have to bundle it to work with it from master. On a SNAPSHOT build it would be able to download. I think its best to bundle it, as we are going to now bundle Endpoint as well.
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 helps air gapped users right?
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 helps developers that use mage package
inside of x-pack/elastic-agent
to build Elastic Agent when heartbeat bundled. Which you want to do to easy testing.
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.
I'm good with bundle it at the moment in master to move forward but we should have a separate discussion if we want to package it or not as we did for other other binaries.
Pinging @elastic/ingest-management (Team:Ingest Management) |
Pinging @elastic/uptime (Team:Uptime) |
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 for the great work here @blakerouse left some minor feedback
id: unique-http-id | ||
name: my-http | ||
schedule: '*/5 * * * * * *' | ||
hosts: ["http://localhost:80/service/status"] |
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.
The one change I'd like to make vs. heartbeat as it is today is to make this singular instead of plural.
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.
@blakerouse If i understand it correctly, the files you have here are "only" for testing but in the end we just forward the blog.
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.
@ruflin Correct, it's just for testing. We forward all the content to heartbeat, it could have an invalid name in there like foo: bar
and that would also be sent.
I will still update the test so it matches the expected structure.
id: unique-http-id | ||
name: my-http | ||
schedule: '*/5 * * * * * *' | ||
hosts: ["http://localhost:80/service/status"] |
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.
same, s/hosts/host/
f2b5beb
to
1b5fa28
Compare
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.
LGTM.
f082ccf
to
e35f413
Compare
…lastic#20387) * Add support for synthetics inputs that run heartbeat. * Run mage fmt. * Add changelog. * Update test configs to use host instead of hosts. * Enable support for top-level inputs from Elastic Agent. (cherry picked from commit b153044)
…artbeat (elastic#20387)" This was breaking the agent build This reverts commit b153044.
…lastic#20387) * Add support for synthetics inputs that run heartbeat. * Run mage fmt. * Add changelog. * Update test configs to use host instead of hosts. * Enable support for top-level inputs from Elastic Agent.
What does this PR do?
This adds support for any input with
synthetics/*
to run heartbeat and send the inputs to heartbeat. This also bundles heartbeat with Elastic Agent indata/downloads
.Note: Currently heartbeat doesn't support the top-level inputs key. Once it does this will just work.
Why is it important?
To support running heartbeat with synthetics inputs.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues