-
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
Initial work toward synthetic monitors #21436
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
Test | Results |
---|---|
Failed | 0 |
Passed | 17502 |
Skipped | 1383 |
Total | 18885 |
* ci: add Heartbeat Packaging for Elastic Synthetics job * ci: change to use Ubuntu-18
* ci: add Heartbeat Packaging for Elastic Synthetics job * ci: change to use Ubuntu-18 * ci: use apm GCP credentials
…heartbeat-synthetics
} | ||
|
||
func TestRunCmd(t *testing.T) { | ||
cmd := exec.Command("go", "run", "./main.go") |
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 I hope this test addresses your concern re: covering actual binary execution!
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 it does. Exactly what I was asking for.
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 looks great and excited to see it finally landing.
I am interested in getting this to work under Agent without needing a container. Seems playwright works on Linux, Mac, and Windows. I am sure we can come up with a way to bundle it all, not requiring a special container.
} | ||
|
||
func TestRunCmd(t *testing.T) { | ||
cmd := exec.Command("go", "run", "./main.go") |
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 it does. Exactly what I was asking for.
x-pack/heartbeat/seccomp_linux.go
Outdated
"with", | ||
"write"} | ||
|
||
fmt.Println("SYSCALLS !!!\n") |
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 think you forgot to remove this line.
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.
Ah, good catch!
/packaging |
Pinging @elastic/uptime (Team:Uptime) |
/packaging test |
/test this |
/packaging this |
/test this |
1 similar comment
/test this |
@@ -0,0 +1,122 @@ | |||
#!/usr/bin/env groovy |
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.
Is this particular pipeline required? The current CI pipeline does not use it, so I wonder if the packaging pipeline should be the one to be used instead?
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.
@kuisathaverat would be the best one to ping here since he added that to this PR. However, I do believe it's essential (today) to make the custom synthetics image based off this branch.
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.
since the x-pack/heartbeat is build in package pipeline, I do not think we need the groovy file. the heartbeat Docker image will be the new synthetics docker image. this pipeline is only to change the name to the Docker image to ...-synthetics
Initial, experimental version of synthetic monitor support for Heartbeat. This works in concert with https://github.com/elastic/synthetics , and is intended to only be run within the docker container built in the synthetics repo. This is guarded by the new ELASTIC_SYNTHETICS_CAPABLE env variable which must be set to true. As a note, this is easy to bypass because the main purpose is to make it clear that we do not support synthetics outside of the docker container for now. This includes a new directory, sample-synthetics-config in the x-pack directory that demonstrates using heartbeat with synthetics. Since we still only want people to run this in the docker image, we guard against accidental use outside of that by checking for the env var ELASTIC_SYNTHETICS_CAPABLE, which we only set in that image (yes, this is easy to circumvent, but we want users to realize they are circumventing something before they do so) (cherry picked from commit e50f673)
…3224) * Initial work toward synthetic monitors (#21436) Initial, experimental version of synthetic monitor support for Heartbeat. This works in concert with https://github.com/elastic/synthetics , and is intended to only be run within the docker container built in the synthetics repo. This is guarded by the new ELASTIC_SYNTHETICS_CAPABLE env variable which must be set to true. As a note, this is easy to bypass because the main purpose is to make it clear that we do not support synthetics outside of the docker container for now. This includes a new directory, sample-synthetics-config in the x-pack directory that demonstrates using heartbeat with synthetics. Since we still only want people to run this in the docker image, we guard against accidental use outside of that by checking for the env var ELASTIC_SYNTHETICS_CAPABLE, which we only set in that image (yes, this is easy to circumvent, but we want users to realize they are circumventing something before they do so) (cherry picked from commit e50f673)
Initial, experimental version of synthetic monitor support for Heartbeat. This works in concert with https://github.com/elastic/synthetics , and is intended to only be run within the docker container built in the synthetics repo. This is guarded by the new ELASTIC_SYNTHETICS_CAPABLE env variable which must be set to true. As a note, this is easy to bypass because the main purpose is to make it clear that we do not support synthetics outside of the docker container for now. This includes a new directory, sample-synthetics-config in the x-pack directory that demonstrates using heartbeat with synthetics. Since we still only want people to run this in the docker image, we guard against accidental use outside of that by checking for the env var ELASTIC_SYNTHETICS_CAPABLE, which we only set in that image (yes, this is easy to circumvent, but we want users to realize they are circumventing something before they do so)
Initial, experimental version of synthetic monitor support for Heartbeat. This works in concert with https://github.com/elastic/synthetics , and is intended to only be run within the docker container built in the synthetics repo. This is guarded by the new ELASTIC_SYNTHETICS_CAPABLE env variable which must be set to true. As a note, this is easy to bypass because the main purpose is to make it clear that we do not support synthetics outside of the docker container for now. This includes a new directory, sample-synthetics-config in the x-pack directory that demonstrates using heartbeat with synthetics. Since we still only want people to run this in the docker image, we guard against accidental use outside of that by checking for the env var ELASTIC_SYNTHETICS_CAPABLE, which we only set in that image (yes, this is easy to circumvent, but we want users to realize they are circumventing something before they do so)
Initial, experimental version of synthetic monitor support for Heartbeat. This works in concert with https://github.com/elastic/synthetics , and is intended to only be run within the docker container built in the synthetics repo. This is guarded by the new
ELASTIC_SYNTHETICS_CAPABLE
env variable which must be set totrue
. As a note, this is easy to bypass because the main purpose is to make it clear that we do not support synthetics outside of the docker container for now.This includes a new directory,
sample-synthetics-config
in the x-pack directory that demonstrates using heartbeat with synthetics. In the futureChecklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
You can check that this PR works by running (in the x-pack/heartbeat directory):
mage build && env ELASTIC_SYNTHETICS_CAPABLE=true ./heartbeat --path.config sample-synthetics-config/ -e