-
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 metricbeat benchmark module #41801
base: main
Are you sure you want to change the base?
Conversation
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
593d87c
to
158f2b2
Compare
The nth info metric emitted by the benchmark module | ||
|
||
|
||
type: keyword |
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.
Should this be a numeric type?
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.
Probably not. Even though it is numeric "data", it is unlikely we would use range searches, it is much more likely we want fast retrieval. ie you search to make sure that benchmark metric number 13 was actually indexed.
Here is the tip from elasticsearch docs I'm basing this off of.
Mapping numeric identifiers
Not all numeric data should be mapped as a numeric field data type. Elasticsearch optimizes numeric fields, such as integer or long, for range queries. However, keyword fields are better for term and other term-level queries.
Identifiers, such as an ISBN or a product ID, are rarely used in range queries. However, they are often retrieved using term-level queries.
Consider mapping a numeric identifier as a keyword if:
- You don’t plan to search for the identifier data using range queries.
- Fast retrieval is important. term query searches on keyword fields are often faster than term searches on numeric fields.
If you’re unsure which to use, you can use a multi-field to map the data as both a keyword and a numeric data type.
- module: prometheus | ||
period: 10s | ||
metricsets: ["collector"] |
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.
Does this need to change as part of this PR?
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.
No, in that it isn't part of this change. But Yes in that mage config
generates it. I don't know why #40411 didn't already pull this change in.
info | ||
fields: | ||
- name: counter | ||
type: keyword |
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.
Should this be a numeric type?
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.
See previous comment on why "numeric" data shouldn't always have a numeric type in elasticsearch.
This pull request is now in conflicts. Could you fix it? 🙏
|
f1ea47c
to
3d62e40
Compare
@ycombinator how do you feel about the numeric vs keyword reasoning? |
Proposed commit message
Add a metricbeat benchmark module.
This module will generate a synthetic metric every
period
. It can be configured to send multiple events by setting thecount
option.This is useful if you need to write integration tests that produce metrics without having to setup something to monitor. It is also useful for testing output configuration and sizing of systems.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
None. New module.
Author's Checklist
How to test this PR locally
Unit tests
By Hand
build metricbeat from this PR, and then run with the following
metricbeat.yml
Related issues
Use cases
Screenshots
Logs