-
Notifications
You must be signed in to change notification settings - Fork 474
Rally benchmark aws.ec2 logs #8416
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
10 commits
Select commit
Hold shift + click to select a range
cf36d26
add aws.ec2_logs rally benchmark
64e8a87
fix typo in template
246d4a6
fix data_stream name
ed0e8f7
fix data_stream.namespace
dc7f053
fix event.dataset
eae6f14
bump github.com/elastic/package-spec/v3@v3.0.1
2d146b4
Merge branch 'main' into rally_benchmark_aws.ec2_logs
75a66c0
rename ec2_logs to ec2logs
dc88e64
Merge branch 'main' into rally_benchmark_aws.ec2_logs
5b237bb
fix period
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
description: Benchmark 20000 aws.ec2_logs events ingested | ||
data_stream: | ||
name: ec2_logs | ||
corpora: | ||
generator: | ||
total_events: 20000 | ||
template: | ||
type: gotext | ||
path: ./ec2logs-benchmark/template.ndjson | ||
config: | ||
path: ./ec2logs-benchmark/config.yml | ||
fields: | ||
path: ./ec2logs-benchmark/fields.yml |
16 changes: 16 additions & 0 deletions
16
packages/aws/_dev/benchmark/rally/ec2logs-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,16 @@ | ||
fields: | ||
- name: 'timestamp' | ||
period: -24h # one day | ||
- name: process.name | ||
enum: ["journal", "kernel", "systemd"] | ||
- name: agent.id | ||
value: "da6cb4c8-c84c-4c5f-97c7-f8586a098af4" | ||
- name: cloud.region | ||
enum: ["us-east-1", "us-east-2", "us-west-1", "us-west-2", "ap-south-1", "ap-northeast-3", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "eu-north-1", "sa-east-1", "af-south-1", "ap-east-1", "ap-south-2", "ap-southeast-3", "eu-south-2", "eu-central-2", "me-south-1", "me-central-1"] | ||
cardinality: 100 | ||
- name: aws.cloudwatch.log_stream | ||
cardinality: 100 | ||
- name: host.name | ||
cardinality: 100 | ||
- name: aws.ec2.ip_address | ||
cardinality: 100 |
20 changes: 20 additions & 0 deletions
20
packages/aws/_dev/benchmark/rally/ec2logs-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,20 @@ | ||
- name: timestamp | ||
type: date | ||
- name: process.name | ||
type: keyword | ||
- name: event.ingested | ||
type: date | ||
- name: aws.ec2.ip_address | ||
type: ip | ||
- name: message | ||
type: text | ||
- name: aws.cloudwatch.log_stream | ||
type: keyword | ||
- name: host.name | ||
type: keyword | ||
- name: agent.id | ||
type: keyword | ||
- name: event.id | ||
type: keyword | ||
- name: cloud.region | ||
type: keyword |
48 changes: 48 additions & 0 deletions
48
packages/aws/_dev/benchmark/rally/ec2logs-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,48 @@ | ||
{{- $timestamp := generate "timestamp" }} | ||
{{- $ip := generate "aws.ec2.ip_address" }} | ||
{{- $pname := generate "process.name" }} | ||
{{- $logstream := generate "aws.cloudwatch.log_stream" }} | ||
{{- $hostname := generate "host.name" }} | ||
{{- $agentId := generate "agent.id" }} | ||
{ | ||
"@timestamp": "{{ $timestamp.Format "2006-01-02T15:04:05.999999Z07:00" }}", | ||
"aws.cloudwatch": { | ||
"log_stream": "{{$logstream}}", | ||
"ingestion_time": "{{ $timestamp | date "2006-01-02T15:04:05.000Z" }}", | ||
"log_group": "/var/log/messages" | ||
}, | ||
"cloud": { | ||
"region": "{{ generate "cloud.region" }}" | ||
}, | ||
"log.file.path": "/var/log/messages/{{$logstream}}", | ||
"input": { | ||
"type": "aws-cloudwatch" | ||
}, | ||
"data_stream": { | ||
"namespace": "ep", | ||
"type": "logs", | ||
"dataset": "aws.ec2_logs" | ||
}, | ||
"process": { | ||
"name": "{{ $pname }}" | ||
}, | ||
"message": "{{$timestamp | date "2006-01-02T15:04:05.000Z"}} {{$timestamp | date "Jan"}} {{$timestamp | date "02"}} {{$timestamp | date "15:04:05"}} {{printf "ip-%s" ($ip | splitList "." | join "-")}} {{$pname}}: {{generate "message"}}", | ||
"event": { | ||
"id": "{{ generate "event.id" }}", | ||
"ingested": "{{ generate "event.ingested" | date "2006-01-02T15:04:05.000000000Z" }}", | ||
"dataset": "aws.ec2_logs" | ||
}, | ||
"host": { | ||
"name": "{{$hostname}}" | ||
}, | ||
"agent": { | ||
"id": "{{$agentId}}", | ||
"name": "{{$hostname}}", | ||
"type": "filebeat", | ||
"version": "8.8.0", | ||
"ephemeral_id": "{{$agentId}}" | ||
}, | ||
"tags": [ | ||
"preserve_original_event" | ||
] | ||
} |
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.
same question here as in the other PR - how can a field have cardinality of 100, when it has fewer possible values?
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.
wanted to follow up on this cardinality value - where does 100 come from?
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 just want to have 100 ec2 instances (
aws.cloudwatch.log_stream
/host.name
/aws.ec2.ip_address
): sincecloud.region
is an enum with length 25, 100 itself is the LCMThere 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.
so if you didn't specify this - you would end up with 25 unique instances? by specifying this, for each region, you generate 4 unique values of the
log_stream
,host.name
andip_address
, resulting in 100 unique instances?