Skip to content
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

Parse apmbench results, add ES basicauth #1

Merged

Conversation

marclop
Copy link
Contributor

@marclop marclop commented Apr 1, 2022

Description

Updates the benchmark parsing to allow to optionally parse the extra
metrics that are published by apmbench. Modified the Elasticsearch
request handling slightly to allow us to authenticate using basicauth
and also work with versions of the stack 8.0.0+.

Last, created a Go module to allow the project to work with newer Go
versions.

How to test this changes

  1. Start a local Elastic stack.
  2. cat testdata/benchmark-result.txt| go run main.go -es http://localhost:9200 -es-username admin -es-password changeme -tag "apm-server_version=8.1.2,size=4096.
  3. Verify it is indexed in the gobench index with the right mappings, and that the extra_metrics fields are all indexed as float.
  4. Run index_all.sh from https://gist.github.com/marclop/914c5ebcd53b4ba403066cebc39bf644.
  5. Import the dashboard from the gist above and verify it works.

Related issues

Part or elastic/apm-server#7540

Updates the benchmark parsing to allow to optionally parse the extra
metrics that are published by apmbench. Modified the Elasticsearch
request handling slightly to allow us to authenticate using basicauth
and also work with versions of the stack `8.0.0+`.

Last, created a Go module to allow the project to work with newer Go
versions.

Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
@marclop marclop added the enhancement New feature or request label Apr 1, 2022
Copy link

@jlvoiseux jlvoiseux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, works great !

image

main.go Outdated Show resolved Hide resolved
Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
@marclop marclop requested a review from axw April 11, 2022 15:23
Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates, looks great!

Later on I think it would be great if we could look at removing well known units from the metric names, and instead set them as field metadata for automatically selecting the default formatter in Lens.

@marclop
Copy link
Contributor Author

marclop commented Apr 12, 2022

I wasn't aware that the mappings were now able to specify all of that, but it looks worth looking into. I will open a follow up issue on this repo which we can come back to.

@marclop marclop merged commit 2f9c944 into elastic:master Apr 12, 2022
@marclop marclop deleted the f/add-gobench-fields-go-module-es-basicauth branch April 12, 2022 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants