-
Notifications
You must be signed in to change notification settings - Fork 127
Add benchmark validate command for static validation #1718
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
13 commits
Select commit
Hold shift + click to select a range
5bdae70
first version
flash1293 68679c2
remove unncessary stuff@
flash1293 4ff5e2a
terminate setUp early in case of initialize error
flash1293 3410aaf
update readme
flash1293 fa87a81
review comments
flash1293 9cd964a
Merge remote-tracking branch 'upstream/main' into 1610-add-static-val…
flash1293 f453187
Merge remote-tracking branch 'upstream/main' into 1610-add-static-val…
flash1293 c8038ce
bump number of generated events
flash1293 b6c36eb
review comments
flash1293 062dc76
Merge remote-tracking branch 'upstream/main' into 1610-add-static-val…
flash1293 bec28e4
comment reviews
flash1293 9a6ad9f
update readme
flash1293 ca081ee
review comment
flash1293 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
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
14 changes: 14 additions & 0 deletions
14
...alse_positives/rally_benchmark_malformed_template/_dev/benchmark/rally/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,14 @@ | ||
| --- | ||
| description: Benchmark 20000 events ingested | ||
| data_stream: | ||
| name: testds | ||
| corpora: | ||
| generator: | ||
| total_events: 20000 | ||
| template: | ||
| type: gotext | ||
| path: ./logs-benchmark/template.ndjson | ||
| config: | ||
| path: ./logs-benchmark/config.yml | ||
| fields: | ||
| path: ./logs-benchmark/fields.yml |
22 changes: 22 additions & 0 deletions
22
...sitives/rally_benchmark_malformed_template/_dev/benchmark/rally/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,22 @@ | ||
| fields: | ||
| - name: '@timestamp' | ||
| period: 1s | ||
| - name: container.id | ||
| - name: log.flags | ||
| type: keyword | ||
| - name: log.offset | ||
| cardinality: 10000 | ||
| - name: tags | ||
| enum: ["production", "env2"] | ||
| - name: IP | ||
| cardinality: 100 | ||
| - name: StatusCode | ||
| enum: ["200", "400", "404"] | ||
| - name: Size | ||
| range: | ||
| min: 1 | ||
| max: 1000 | ||
| - name: Port | ||
| range: | ||
| min: 8000 | ||
| max: 8080 |
23 changes: 23 additions & 0 deletions
23
...sitives/rally_benchmark_malformed_template/_dev/benchmark/rally/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,23 @@ | ||
| - name: timestamp | ||
| type: date | ||
| - name: container.id | ||
| type: keyword | ||
| - name: log.file.path | ||
| example: /var/log/fun-times.log | ||
| type: keyword | ||
| - name: log.flags | ||
| type: keyword | ||
| - name: log.offset | ||
| type: long | ||
| - name: tags | ||
| type: keyword | ||
| - name: IP | ||
| type: ip | ||
| - name: StatusCode | ||
| type: keyword | ||
| - name: Size | ||
| type: long | ||
| - name: Hostname | ||
| type: keyword | ||
| - name: Port | ||
| type: long |
14 changes: 14 additions & 0 deletions
14
...es/rally_benchmark_malformed_template/_dev/benchmark/rally/logs-benchmark/template.ndjson
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,14 @@ | ||
| {{- $timestamp := generate "timestamp" -}} | ||
| { | ||
| "@timestamp": "{{ $timestamp.Format "2006-01-02T15:04:05.999999Z07:00" }}", | ||
| "data_stream.type": "logs", | ||
| "data_stream.dataset": "rally_benchmarks.testds", | ||
| "data_stream.namespace": "ep", | ||
| "container.id": "{{ generate "container.id" }}", | ||
| "input.type": "filestream", | ||
| "log.file.path": "{{ generate "log.file.path" }}", | ||
| "log.flags": "{{ generate "log.flags" }}", | ||
| "log.offset": {{ generate "log.offset" }}, | ||
| "tags": ["rally_benchmark.testds", "forwarded", "{{ generate "tags" }" ], | ||
| "message": "{{ generate "IP" }} - - [{{ $timestamp.Format "02/Jan/2006:15:04:05.999999 -0700" }}] \"GET /favicon.ico HTTP/1.1\" {{ generate "StatusCode" }} {{ generate "Size" }} \"http://{{ generate "Hostname" }}:{{ generate "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\"" | ||
| } |
6 changes: 6 additions & 0 deletions
6
test/packages/false_positives/rally_benchmark_malformed_template/changelog.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,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/1522 |
1 change: 1 addition & 0 deletions
1
...ly_benchmark_malformed_template/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
.../rally_benchmark_malformed_template/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 |
23 changes: 23 additions & 0 deletions
23
...benchmark_malformed_template/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 }}' |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.