-
Notifications
You must be signed in to change notification settings - Fork 127
Support system benchmarking with the logstash-output in the benchmarking agent policies #1615
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
test/packages/with-logstash/system_benchmark/_dev/benchmark/system/logs-benchmark.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --- | ||
| description: Benchmark 20000 events ingested | ||
| input: filestream | ||
| vars: ~ | ||
| data_stream: | ||
| name: testds | ||
| vars: | ||
| paths: | ||
| - "{{SERVICE_LOGS_DIR}}/corpus-*" | ||
| warmup_time_period: 10s | ||
| wait_for_data_timeout: 10m | ||
| corpora: | ||
| generator: | ||
| total_events: 20000 | ||
| template: | ||
| path: ./logs-benchmark/template.log | ||
| config: | ||
| path: ./logs-benchmark/config.yml | ||
| fields: | ||
| path: ./logs-benchmark/fields.yml |
39 changes: 39 additions & 0 deletions
39
test/packages/with-logstash/system_benchmark/_dev/benchmark/system/logs-benchmark/config.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| fields: | ||
| - name: IP | ||
| cardinality: 100 | ||
| - name: Day | ||
| range: | ||
| min: 1 | ||
| max: 28 | ||
| - name: H | ||
| range: | ||
| min: 10 | ||
| max: 23 | ||
| - name: MS | ||
| range: | ||
| min: 10 | ||
| max: 59 | ||
| - name: Mon | ||
| enum: | ||
| - "Jan" | ||
| - "Feb" | ||
| - "Mar" | ||
| - "Apr" | ||
| - "May" | ||
| - "Jun" | ||
| - "Jul" | ||
| - "Aug" | ||
| - "Sep" | ||
| - "Oct" | ||
| - "Nov" | ||
| - "Dec" | ||
| - name: StatusCode | ||
| enum: ["200", "400", "404"] | ||
| - name: Size | ||
| range: | ||
| min: 1 | ||
| max: 1000 | ||
| - name: Port | ||
| range: | ||
| min: 8000 | ||
| max: 8080 |
18 changes: 18 additions & 0 deletions
18
test/packages/with-logstash/system_benchmark/_dev/benchmark/system/logs-benchmark/fields.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| - name: IP | ||
| type: ip | ||
| - name: Day | ||
| type: long | ||
| - name: Mon | ||
| type: keyword | ||
| - name: H | ||
| type: long | ||
| - name: MS | ||
| type: long | ||
| - name: StatusCode | ||
| type: keyword | ||
| - name: Size | ||
| type: long | ||
| - name: Hostname | ||
| type: keyword | ||
| - name: Port | ||
| type: long |
1 change: 1 addition & 0 deletions
1
...packages/with-logstash/system_benchmark/_dev/benchmark/system/logs-benchmark/template.log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {{.IP}} - - [{{.Day}}/{{.Mon}}/2022:{{.H}}:{{.MS}}:{{.MS}} +0200] "GET /favicon.ico HTTP/1.1" {{.StatusCode}} {{.Size}} "http://{{.Hostname}}:{{.Port}}/" "skip-this-one/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # newer versions go on top | ||
| - version: "999.999.999" | ||
| changes: | ||
| - description: initial release | ||
| type: enhancement # can be one of: enhancement, bugfix, breaking-change | ||
| link: https://github.com/elastic/elastic-package/pull/906 |
1 change: 1 addition & 0 deletions
1
.../with-logstash/system_benchmark/data_stream/testds/_dev/benchmark/pipeline/access-raw.log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 1.2.3.4 - - [25/Oct/2016:14:49:34 +0200] "GET /favicon.ico HTTP/1.1" 404 571 "http://localhost:8080/" "skip-this-one/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36" |
1 change: 1 addition & 0 deletions
1
...ages/with-logstash/system_benchmark/data_stream/testds/_dev/benchmark/pipeline/config.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| num_docs: 10000 |
4 changes: 4 additions & 0 deletions
4
...ackages/with-logstash/system_benchmark/data_stream/testds/agent/stream/filestream.yml.hbs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| paths: | ||
| {{#each paths as |path i|}} | ||
| - {{path}} | ||
| {{/each}} |
1 change: 1 addition & 0 deletions
1
test/packages/with-logstash/system_benchmark/data_stream/testds/agent/stream/udp.yml.hbs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| host: "{{host}}:{{port}}" |
23 changes: 23 additions & 0 deletions
23
...th-logstash/system_benchmark/data_stream/testds/elasticsearch/ingest_pipeline/default.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| --- | ||
| description: Pipeline for parsing Nginx access logs. Requires the geoip and user_agent | ||
| plugins. | ||
| processors: | ||
| - grok: | ||
| field: message | ||
| patterns: | ||
| - (%{NGINX_HOST} )?"?(?:%{NGINX_ADDRESS_LIST:nginx.access.remote_ip_list}|%{NOTSPACE:source.address}) | ||
| - (-|%{DATA:user.name}) \[%{HTTPDATE:nginx.access.time}\] "%{DATA:nginx.access.info}" | ||
| %{NUMBER:http.response.status_code:long} %{NUMBER:http.response.body.bytes:long} | ||
| "(-|%{DATA:http.request.referrer})" "(-|%{DATA:user_agent.original})" | ||
| pattern_definitions: | ||
| NGINX_HOST: (?:%{IP:destination.ip}|%{NGINX_NOTSEPARATOR:destination.domain})(:%{NUMBER:destination.port})? | ||
| NGINX_NOTSEPARATOR: "[^\t ,:]+" | ||
| NGINX_ADDRESS_LIST: (?:%{IP}|%{WORD})("?,?\s*(?:%{IP}|%{WORD}))* | ||
| ignore_missing: true | ||
| - user_agent: | ||
| field: user_agent.original | ||
| ignore_missing: true | ||
| on_failure: | ||
| - set: | ||
| field: error.message | ||
| value: '{{ _ingest.on_failure_message }}' |
38 changes: 38 additions & 0 deletions
38
test/packages/with-logstash/system_benchmark/data_stream/testds/fields/base-fields.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| - name: data_stream.type | ||
| type: constant_keyword | ||
| description: Data stream type. | ||
| - name: data_stream.dataset | ||
| type: constant_keyword | ||
| description: Data stream dataset. | ||
| - name: data_stream.namespace | ||
| type: constant_keyword | ||
| description: Data stream namespace. | ||
| - name: '@timestamp' | ||
| type: date | ||
| description: Event timestamp. | ||
| - name: container.id | ||
| description: Unique container id. | ||
| ignore_above: 1024 | ||
| type: keyword | ||
| - name: input.type | ||
| description: Type of Filebeat input. | ||
| type: keyword | ||
| - name: log.file.path | ||
| description: Full path to the log file this event came from. | ||
| example: /var/log/fun-times.log | ||
| ignore_above: 1024 | ||
| type: keyword | ||
| - name: log.source.address | ||
| description: Source address from which the log event was read / sent from. | ||
| type: keyword | ||
| - name: log.flags | ||
| description: Flags for the log file. | ||
| type: keyword | ||
| - name: log.offset | ||
| description: Offset of the entry in the log file. | ||
| type: long | ||
| - name: tags | ||
| description: List of keywords used to tag each event. | ||
| example: '["production", "env2"]' | ||
| ignore_above: 1024 | ||
| type: keyword |
36 changes: 36 additions & 0 deletions
36
test/packages/with-logstash/system_benchmark/data_stream/testds/manifest.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| title: Test | ||
| release: experimental | ||
| type: logs | ||
| streams: | ||
| - input: udp | ||
| title: UDP logs | ||
| enabled: false | ||
| description: Collect UDP logs | ||
| template_path: udp.yml.hbs | ||
| vars: | ||
| - name: host | ||
| type: text | ||
| title: UDP host to listen on | ||
| multi: false | ||
| required: true | ||
| show_user: true | ||
| default: localhost | ||
| - name: port | ||
| type: integer | ||
| title: UDP port to listen on | ||
| multi: false | ||
| required: true | ||
| show_user: true | ||
| default: 9511 | ||
| - input: filestream | ||
| enabled: false | ||
| title: Logs | ||
| description: Collect logs | ||
| template_path: filestream.yml.hbs | ||
| vars: | ||
| - name: paths | ||
| type: text | ||
| title: Paths | ||
| multi: true | ||
| required: true | ||
| show_user: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Test integration | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| format_version: 3.0.0 | ||
| name: system_benchmarks | ||
| title: System benchmarks | ||
| version: 999.999.999 | ||
| description: Test for system benchmark runner | ||
| categories: ["network"] | ||
| type: integration | ||
| conditions: | ||
| kibana: | ||
| version: '^8.0.0' | ||
| policy_templates: | ||
| - name: testpo | ||
| title: Test | ||
| description: Description | ||
| inputs: | ||
| - type: udp | ||
| title: Foo bar | ||
| description: Foo bar | ||
| - type: filestream | ||
| title: Collect logs | ||
| description: Collecting logs | ||
| owner: | ||
| github: elastic/integrations | ||
| type: elastic |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Could we add a test for this case?
Uh oh!
There was an error while loading. Please reload this page.
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.
@jsoriano You mean a test package? The test-check-packages has regular
benchmarksbeing tested. Should we add another package likebenchmarks-with-logstash?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.
It would be a test that runs benchmarks with logstash, it can be a new package or a new script and an existing package, not sure what would be the best approach.
Uh oh!
There was an error while loading. Please reload this page.
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 can add a regression test. As currently logstash does not provide relevant stats that are comparable to ingest node stats. But I just want to make sure we can run system benchmarks even with logstash enabled.
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.
@jsoriano Added a test package