-
Notifications
You must be signed in to change notification settings - Fork 529
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
Update rally cmd to use corpora generated by agent data #8941
Conversation
* Remove cat_bulk and old gencorpora api in favor of systemtest's gencorpora command which generates ES corpora based on agent data.
This pull request does not have a backport label. Could you fix it @lahsivjar? 🙏
NOTE: |
rally: $(PYTHON_BIN)/esrally rally/corpora | ||
@$(PYTHON_BIN)/esrally race \ | ||
--track-path=rally \ | ||
--track-params=expected_cluster_health:yellow,bulk_size:$(RALLY_BULK_SIZE) \ |
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.
[For reviewers] The expected cluster health for local ES cluster will be yellow
since APM integration requires 2 shards but we only launch 1 ES node in local. I plan to add a separate command to run rally for ESS that will have expected cluster health as green
.
📚 Go benchmark reportDiff with the
report generated with https://pkg.go.dev/golang.org/x/perf/cmd/benchstat |
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!
I just ran make rally/corpora
locally, and it failed:
$ make rally/corpora
2022/08/24 13:20:50 Building apm-server...
make[1]: Entering directory '/home/andrew/projects/apm-server'
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
/home/andrew/.gimme/versions/go1.18.5.linux.amd64/bin/go build -o build/apm-server-linux-amd64 -trimpath -buildmode=pie -ldflags "-s -X github.com/elastic/beats/v7/libbeat/version.commit=bbad2e2726fb002c131ed6a6437607c6f9ff3956 -X github.com/elastic/beats/v7/libbeat/version.buildTime=2022-08-24T11:44:28+08:00" ./x-pack/apm-server
make[1]: Leaving directory '/home/andrew/projects/apm-server'
2022/08/24 13:20:53 Built /home/andrew/projects/apm-server/build/apm-server-linux-amd64
2022-08-24T13:20:53.030+0800 ERROR kibana kibana/connecting_client.go:77 failed to obtain connection to Kibana: fail to get the Kibana version: HTTP GET request to http://localhost:5601/api/status fails: fail to execute the HTTP GET request: Get "http://localhost:5601/api/status": dial tcp 127.0.0.1:5601: connect: connection refused. Response: {"service.name": "apm-server", "ecs.version": "1.6.0"}
github.com/elastic/apm-server/systemtest/gencorpora.StreamAPMServerLogs
/home/andrew/projects/apm-server/systemtest/gencorpora/apmserver.go:65
main.run.func2
/home/andrew/projects/apm-server/systemtest/cmd/gencorpora/main.go:68
golang.org/x/sync/errgroup.(*Group).Go.func1
/home/andrew/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57
2022-08-24T13:20:54.462+0800 ERROR kibana kibana/connecting_client.go:77 failed to obtain connection to Kibana: fail to get the Kibana version: HTTP GET request to http://localhost:5601/api/status fails: fail to execute the HTTP GET request: Get "http://localhost:5601/api/status": dial tcp 127.0.0.1:5601: connect: connection refused. Response: {"service.name": "apm-server", "ecs.version": "1.6.0"}
github.com/elastic/apm-server/systemtest/gencorpora.StreamAPMServerLogs
/home/andrew/projects/apm-server/systemtest/gencorpora/apmserver.go:65
main.run.func2
/home/andrew/projects/apm-server/systemtest/cmd/gencorpora/main.go:68
golang.org/x/sync/errgroup.(*Group).Go.func1
/home/andrew/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57
That's because apm-server is configured with Kibana credentials, so it tries and fails to connect to Kibana. We should probably disable Kibana config:
diff --git a/systemtest/gencorpora/apmserver.go b/systemtest/gencorpora/apmserver.go
index ad782310b..18720e287 100644
--- a/systemtest/gencorpora/apmserver.go
+++ b/systemtest/gencorpora/apmserver.go
@@ -41,6 +41,7 @@ func NewAPMServer(ctx context.Context, esHost string) *apmservertest.Server {
waitForIntegration := false
srv.Config.WaitForIntegration = &waitForIntegration
srv.Config.Output.Elasticsearch.Hosts = []string{esHost}
+ srv.Config.Kibana = nil
return srv
}
Ah, thanks I will create a commit to fix this. I always run it with |
Motivation/summary
Remove old
rally/gencorpora
code in favor of systemtest'sgencorpora
command which generates ES corpora based on agent data. With this PRmake rally
command can be executed to generate the required corpora and use it with rally to benchmark a local ES cluster.The PR also removes the
cat_bulk.py
script. We don't have feature parity with the script as the script can be used to allow developers to run thecat_bulk
server independently and send traces to it using a custom code to generate ES corpora. The feature can be added as a new command in systemtest and all the building blocks for the same are already present however, I have not added it since there is no current use case for it.Checklist
- [ ] Update CHANGELOG.asciidoc- [ ] Update package changelog.yml (only if changes toapmpackage
have been made)dev_docs/rally.md
holds valid)How to test these changes
./testing/stack-monitoring.sh
make rally
Related issues
Part of #8754