From ad2d1bba255ed5c0fa882ebf592a0592d328603d Mon Sep 17 00:00:00 2001 From: aliabbas-elastic Date: Wed, 14 Feb 2024 20:55:52 +0530 Subject: [PATCH] remove unnecessary fields and add duration for start time --- .../benchmark/rally/node-benchmark/config.yml | 2 + .../benchmark/rally/node-benchmark/fields.yml | 2 + .../rally/node-benchmark/template.ndjson | 62 ++----------------- 3 files changed, 10 insertions(+), 56 deletions(-) diff --git a/packages/kubernetes/_dev/benchmark/rally/node-benchmark/config.yml b/packages/kubernetes/_dev/benchmark/rally/node-benchmark/config.yml index 2b781eccd15..44fb59b4a40 100644 --- a/packages/kubernetes/_dev/benchmark/rally/node-benchmark/config.yml +++ b/packages/kubernetes/_dev/benchmark/rally/node-benchmark/config.yml @@ -5,6 +5,8 @@ fields: range: min: 0 max: 10000 + - name: duration_start + enum: ["-1h", "-2h", "-3h", "-4h"] - name: event_duration range: min: 1 diff --git a/packages/kubernetes/_dev/benchmark/rally/node-benchmark/fields.yml b/packages/kubernetes/_dev/benchmark/rally/node-benchmark/fields.yml index e9fd3441cc8..f078cff60f8 100644 --- a/packages/kubernetes/_dev/benchmark/rally/node-benchmark/fields.yml +++ b/packages/kubernetes/_dev/benchmark/rally/node-benchmark/fields.yml @@ -6,6 +6,8 @@ type: integer - name: event_duration type: long +- name: duration_start + type: keyword - name: cpu_usage_core_ns type: long - name: nanocores diff --git a/packages/kubernetes/_dev/benchmark/rally/node-benchmark/template.ndjson b/packages/kubernetes/_dev/benchmark/rally/node-benchmark/template.ndjson index 953c2dcdeee..589e0a98068 100644 --- a/packages/kubernetes/_dev/benchmark/rally/node-benchmark/template.ndjson +++ b/packages/kubernetes/_dev/benchmark/rally/node-benchmark/template.ndjson @@ -2,6 +2,8 @@ {{- $event_duration := generate "event_duration" }} {{- $rangeofid := generate "rangeofid" -}} {{- $nodeid := div $rangeofid 110 -}} +{{- $duration_start := generate "duration_start" }} +{{- $startTime := generate "timestamp" | date_modify (print $duration_start) }} {{- $memory_available_bytes := generate "memory_available_bytes" }} {{- $memory_usage_bytes := generate "memory_usage_bytes" }} {{- $memory_rss_bytes := generate "memory_rss_bytes" }} @@ -52,14 +54,8 @@ "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": { @@ -73,33 +69,7 @@ "app-2":"demo-2", "app-1":"demo-1" }, - "pod": { - "uid": "demo-pod-{{ $rangeofid }}", - "ip": "{{generate `Ip`}}", - "name": "demo-pod-{{ $rangeofid }}" - }, - "namespace": "demo-{{ $rangeofid }}", - "namespace_uid": "demo-{{ $rangeofid }}", - "replicaset": { - "name": "demo-deployment-{{ $rangeofid }}" - }, - "namespace_labels": { - "kubernetes_io/metadata_name": "demo-{{ $rangeofid }}" - }, - "deployment": { - "name": "demo-deployment-{{ $rangeofid }}" - }, "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" - }, "memory": { "available": { "bytes": {{ $memory_available_bytes }} @@ -155,7 +125,7 @@ } } }, - "start_time": "{{$timestamp.Format "2006-01-02T15:04:05.999999Z07:00"}}", + "start_time": "{{$startTime.Format "2006-01-02T15:04:05.000Z"}}", "cpu": { "usage": { "core": { @@ -178,32 +148,12 @@ "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":{ + "orchestrator":{ + "cluster":{ "name":"kubernetes-scale", "url":"https://{{ generate `Ip` }}" } - }, + }, "ecs": { "version": "8.5.0" }