-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rally benchmark kubernetes.state_pod
- Loading branch information
Showing
4 changed files
with
181 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
packages/kubernetes/_dev/benchmark/rally/state_pod-benchmark.yml
This file contains 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 kubernetes.state_pod events ingested | ||
data_stream: | ||
name: state_pod | ||
corpora: | ||
generator: | ||
total_events: 20000 | ||
template: | ||
type: gotext | ||
path: ./statepod-benchmark/template.ndjson | ||
config: | ||
path: ./statepod-benchmark/config.yml | ||
fields: | ||
path: ./statepod-benchmark/fields.yml |
11 changes: 11 additions & 0 deletions
11
packages/kubernetes/_dev/benchmark/rally/statepod-benchmark/config.yml
This file contains 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,11 @@ | ||
fields: | ||
- name: timestamp | ||
period: 60m | ||
- name: event_duration | ||
range: | ||
min: 1 | ||
max: 1000000 | ||
- name: status_phase | ||
enum: ["running", "pending", "succeeded", "failed", "unknown"] | ||
- name: status_scheduled | ||
enum: ["true", "false", "unknown"] |
12 changes: 12 additions & 0 deletions
12
packages/kubernetes/_dev/benchmark/rally/statepod-benchmark/fields.yml
This file contains 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,12 @@ | ||
- name: Ip | ||
type: ip | ||
- name: timestamp | ||
type: date | ||
- name: rangeofid | ||
type: integer | ||
- name: event_duration | ||
type: long | ||
- name: status_phase | ||
type: keyword | ||
- name: status_scheduled | ||
type: keyword |
144 changes: 144 additions & 0 deletions
144
packages/kubernetes/_dev/benchmark/rally/statepod-benchmark/template.ndjson
This file contains 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,144 @@ | ||
{{- $timestamp := generate "timestamp" }} | ||
{{- $event_duration := generate "event_duration" }} | ||
{{- $rangeofid := generate "rangeofid" -}} | ||
{{- $nodeid := div $rangeofid 110 -}} | ||
{{- $status_phase := generate "status_phase" }} | ||
{{- $status_scheduled := generate "status_scheduled" }} | ||
{ | ||
"@timestamp": "{{$timestamp.Format "2006-01-02T15:04:05.999999Z07:00"}}", | ||
"kubernetes": { | ||
"node": { | ||
"uid": "host-{{ $nodeid }}", | ||
"hostname": "host-{{ $nodeid }}", | ||
"name": "host-{{ $nodeid }}", | ||
"labels": { | ||
"kubernetes_io/hostname": "kubernetes-scale-123456", | ||
"beta_kubernetes_io/os": "linux", | ||
"kubernetes_io/arch": "amd64", | ||
"kubernetes_io/os": "linux", | ||
"beta_kubernetes_io/arch": "amd64" | ||
} | ||
}, | ||
"pod": { | ||
"uid": "demo-pod-{{ $rangeofid }}", | ||
"host_ip": "{{generate `Ip`}}", | ||
"ip": "{{generate `Ip`}}", | ||
"name": "demo-pod-{{ $rangeofid }}", | ||
"status": { | ||
"phase": "{{ $status_phase }}", | ||
{{- if eq $status_phase "running"}} | ||
"ready": "true", | ||
{{- else if eq $status_phase "pending"}} | ||
"ready": "false", | ||
{{- else if eq $status_phase "failed"}} | ||
"ready": "false", | ||
{{- else if eq $status_phase "succeeded"}} | ||
"ready": "true", | ||
{{- else if eq $status_phase "unknown"}} | ||
"ready": "unknown", | ||
{{- end}} | ||
"scheduled": "{{ $status_scheduled }}" | ||
} | ||
|
||
}, | ||
"namespace": "demo-{{ $rangeofid }}", | ||
"namespace_uid": "demo-{{ $rangeofid }}", | ||
"replicaset": { | ||
"name": "demo-deployment-{{ $rangeofid }}" | ||
}, | ||
"namespace_labels": { | ||
"kubernetes_io/metadata_name": "demo-{{ $rangeofid }}" | ||
}, | ||
"labels": { | ||
"app":"demo", | ||
"pod-template-hash":"{{ $rangeofid }}", | ||
"app-2":"demo-2", | ||
"app-1":"demo-1" | ||
}, | ||
"deployment": { | ||
"name": "demo-deployment-{{ $rangeofid }}" | ||
} | ||
}, | ||
"agent": { | ||
"name": "kubernetes-scale-123456", | ||
"id": "de42127b-4db8-4471-824e-a7b14f478663", | ||
"ephemeral_id": "22ed892c-43bd-408a-9121-65e2f5b6a56e", | ||
"type": "metricbeat", | ||
"version": "8.8.0" | ||
}, | ||
"elastic_agent": { | ||
"id": "de42127b-4db8-4471-824e-a7b14f478663", | ||
"version": "8.8.0", | ||
"snapshot": true | ||
}, | ||
"cloud": { | ||
"provider": "gcp", | ||
"availability_zone": "europe-west1-d", | ||
"instance":{ | ||
"name": "kubernetes-scale-123456" , | ||
"id": "de42127b-4db8-4471-824e-a7b14f478663" | ||
}, | ||
"machine":{ | ||
"type":"e2-standard-4" | ||
}, | ||
"service":{ | ||
"name":"GCE" | ||
}, | ||
"project":{ | ||
"id":"elastic-obs-integrations-dev" | ||
}, | ||
"account":{ | ||
"id":"elastic-obs-integrations-dev" | ||
} | ||
}, | ||
"orchestrator":{ | ||
"cluster":{ | ||
"name":"kubernetes-scale", | ||
"url":"https://{{ generate `Ip` }}" | ||
} | ||
}, | ||
"ecs": { | ||
"version": "8.0.0" | ||
}, | ||
"data_stream": { | ||
"namespace": "ep", | ||
"type": "metrics", | ||
"dataset": "kubernetes.state_pod" | ||
}, | ||
"service": { | ||
"address": "http://kubernetes-scale-123456:8080/metrics", | ||
"type": "kubernetes" | ||
}, | ||
"host": { | ||
"hostname": "kubernetes-scale-123456", | ||
"os": { | ||
"kernel": "5.10.47-linuxkit", | ||
"codename": "Core", | ||
"name": "CentOS Linux", | ||
"type": "linux", | ||
"family": "redhat", | ||
"version": "7 (Core)", | ||
"platform": "centos" | ||
}, | ||
"containerized": true, | ||
"ip": [ | ||
"192.168.244.7" | ||
], | ||
"name": "kubernetes-scale-123456", | ||
"id": "85e35c2b5e1b39ba72393a6baf6ee7cd", | ||
"mac": [ | ||
"fe:ec:82:9f:29:19" | ||
], | ||
"architecture": "x86_64" | ||
}, | ||
"metricset": { | ||
"period": 10000, | ||
"name": "state_pod" | ||
}, | ||
"event": { | ||
"duration": {{ $event_duration }}, | ||
"agent_id_status": "verified", | ||
"module": "kubernetes", | ||
"dataset": "kubernetes.state_pod" | ||
} | ||
} |