Skip to content

Commit e300934

Browse files
authored
[O11y][Kubernetes] Rally benchmark kubernetes.state_pod (#9136)
* rally benchmark kubernetes.state_pod * add rangeofid config * remove host.ip and host.mac
1 parent 2829b1c commit e300934

File tree

4 files changed

+179
-0
lines changed

4 files changed

+179
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: Benchmark 20000 kubernetes.state_pod events ingested
3+
data_stream:
4+
name: state_pod
5+
corpora:
6+
generator:
7+
total_events: 20000
8+
template:
9+
type: gotext
10+
path: ./statepod-benchmark/template.ndjson
11+
config:
12+
path: ./statepod-benchmark/config.yml
13+
fields:
14+
path: ./statepod-benchmark/fields.yml
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
fields:
2+
- name: timestamp
3+
period: 60m
4+
- name: event_duration
5+
range:
6+
min: 1
7+
max: 1000000
8+
- name: rangeofid
9+
range:
10+
min: 0
11+
max: 10000
12+
- name: status_phase
13+
enum: ["running", "pending", "succeeded", "failed", "unknown"]
14+
- name: status_scheduled
15+
enum: ["true", "false", "unknown"]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
- name: Ip
2+
type: ip
3+
- name: timestamp
4+
type: date
5+
- name: rangeofid
6+
type: integer
7+
- name: event_duration
8+
type: long
9+
- name: status_phase
10+
type: keyword
11+
- name: status_scheduled
12+
type: keyword
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{{- $timestamp := generate "timestamp" }}
2+
{{- $event_duration := generate "event_duration" }}
3+
{{- $rangeofid := generate "rangeofid" -}}
4+
{{- $nodeid := div $rangeofid 110 -}}
5+
{{- $status_phase := generate "status_phase" }}
6+
{{- $status_scheduled := generate "status_scheduled" }}
7+
{
8+
"@timestamp": "{{$timestamp.Format "2006-01-02T15:04:05.999999Z07:00"}}",
9+
"kubernetes": {
10+
"node": {
11+
"uid": "host-{{ $nodeid }}",
12+
"hostname": "host-{{ $nodeid }}",
13+
"name": "host-{{ $nodeid }}",
14+
"labels": {
15+
"kubernetes_io/hostname": "kubernetes-scale-123456",
16+
"beta_kubernetes_io/os": "linux",
17+
"kubernetes_io/arch": "amd64",
18+
"kubernetes_io/os": "linux",
19+
"beta_kubernetes_io/arch": "amd64"
20+
}
21+
},
22+
"pod": {
23+
"uid": "demo-pod-{{ $rangeofid }}",
24+
"host_ip": "{{generate `Ip`}}",
25+
"ip": "{{generate `Ip`}}",
26+
"name": "demo-pod-{{ $rangeofid }}",
27+
"status": {
28+
"phase": "{{ $status_phase }}",
29+
{{- if eq $status_phase "running"}}
30+
"ready": "true",
31+
{{- else if eq $status_phase "pending"}}
32+
"ready": "false",
33+
{{- else if eq $status_phase "failed"}}
34+
"ready": "false",
35+
{{- else if eq $status_phase "succeeded"}}
36+
"ready": "true",
37+
{{- else if eq $status_phase "unknown"}}
38+
"ready": "unknown",
39+
{{- end}}
40+
"scheduled": "{{ $status_scheduled }}"
41+
}
42+
43+
},
44+
"namespace": "demo-{{ $rangeofid }}",
45+
"namespace_uid": "demo-{{ $rangeofid }}",
46+
"replicaset": {
47+
"name": "demo-deployment-{{ $rangeofid }}"
48+
},
49+
"namespace_labels": {
50+
"kubernetes_io/metadata_name": "demo-{{ $rangeofid }}"
51+
},
52+
"labels": {
53+
"app":"demo",
54+
"pod-template-hash":"{{ $rangeofid }}",
55+
"app-2":"demo-2",
56+
"app-1":"demo-1"
57+
},
58+
"deployment": {
59+
"name": "demo-deployment-{{ $rangeofid }}"
60+
}
61+
},
62+
"agent": {
63+
"name": "kubernetes-scale-123456",
64+
"id": "de42127b-4db8-4471-824e-a7b14f478663",
65+
"ephemeral_id": "22ed892c-43bd-408a-9121-65e2f5b6a56e",
66+
"type": "metricbeat",
67+
"version": "8.8.0"
68+
},
69+
"elastic_agent": {
70+
"id": "de42127b-4db8-4471-824e-a7b14f478663",
71+
"version": "8.8.0",
72+
"snapshot": true
73+
},
74+
"cloud": {
75+
"provider": "gcp",
76+
"availability_zone": "europe-west1-d",
77+
"instance":{
78+
"name": "kubernetes-scale-123456" ,
79+
"id": "de42127b-4db8-4471-824e-a7b14f478663"
80+
},
81+
"machine":{
82+
"type":"e2-standard-4"
83+
},
84+
"service":{
85+
"name":"GCE"
86+
},
87+
"project":{
88+
"id":"elastic-obs-integrations-dev"
89+
},
90+
"account":{
91+
"id":"elastic-obs-integrations-dev"
92+
}
93+
},
94+
"orchestrator":{
95+
"cluster":{
96+
"name":"kubernetes-scale",
97+
"url":"https://{{ generate `Ip` }}"
98+
}
99+
},
100+
"ecs": {
101+
"version": "8.0.0"
102+
},
103+
"data_stream": {
104+
"namespace": "ep",
105+
"type": "metrics",
106+
"dataset": "kubernetes.state_pod"
107+
},
108+
"service": {
109+
"address": "http://kubernetes-scale-123456:8080/metrics",
110+
"type": "kubernetes"
111+
},
112+
"host": {
113+
"hostname": "kubernetes-scale-123456",
114+
"os": {
115+
"kernel": "5.10.47-linuxkit",
116+
"codename": "Core",
117+
"name": "CentOS Linux",
118+
"type": "linux",
119+
"family": "redhat",
120+
"version": "7 (Core)",
121+
"platform": "centos"
122+
},
123+
"containerized": true,
124+
"name": "kubernetes-scale-123456",
125+
"id": "85e35c2b5e1b39ba72393a6baf6ee7cd",
126+
"architecture": "x86_64"
127+
},
128+
"metricset": {
129+
"period": 10000,
130+
"name": "state_pod"
131+
},
132+
"event": {
133+
"duration": {{ $event_duration }},
134+
"agent_id_status": "verified",
135+
"module": "kubernetes",
136+
"dataset": "kubernetes.state_pod"
137+
}
138+
}

0 commit comments

Comments
 (0)