From eb3a042250511e96eb4e4a1679c3418578990fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Sevilla?= Date: Wed, 4 Sep 2024 16:27:48 +0200 Subject: [PATCH] Adapt metadata queries to lastest kube-burner changes (#126) Use jobSummary to get version Reduce result size to report cluster's metadata Formatted changes Signed-off-by: Raul Sevilla --- .../kube-burner-report-mode/panels.libsonnet | 210 ++++++----- .../kube-burner-report-mode/queries.libsonnet | 6 +- .../variables.libsonnet | 14 +- .../panels.libsonnet | 331 ++++++++++-------- .../queries.libsonnet | 16 +- .../variables.libsonnet | 14 +- templates/CPT/kube-burner-report-mode.jsonnet | 8 +- .../kube-burner-report-ocp-wrapper.jsonnet | 8 +- 8 files changed, 309 insertions(+), 298 deletions(-) diff --git a/assets/kube-burner-report-mode/panels.libsonnet b/assets/kube-burner-report-mode/panels.libsonnet index ffe0477..a0bd0f8 100644 --- a/assets/kube-burner-report-mode/panels.libsonnet +++ b/assets/kube-burner-report-mode/panels.libsonnet @@ -16,11 +16,7 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn + table.gridPos.withH(gridPos.h) + table.gridPos.withW(gridPos.w), - withPagination(title, unit, targets, gridPos): - self.base(title, unit, targets, gridPos) - + options.footer.TableFooterOptions.withEnablePagination(true), - - withBenchmarkOverview(title, unit, targets, gridPos): + withPlatformOverview(title, unit, targets, gridPos): self.base(title, unit, targets, gridPos) + table.queryOptions.withTransformations([ { @@ -30,113 +26,125 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn _id: true, _index: true, _type: true, - benchmark: false, clustertype: true, + elapsedTime: true, endDate: true, - end_date: true, + endTimestamp: true, highlight: true, + 'jobConfig.burst': true, + 'jobConfig.churnDelay': true, + 'jobConfig.churnDeletionStrategy': true, + 'jobConfig.churnDuration': true, + 'jobConfig.churnPercent': true, 'jobConfig.cleanup': true, 'jobConfig.errorOnVerify': true, + 'jobConfig.iterationsPerNamespace': true, 'jobConfig.jobIterationDelay': true, - 'jobConfig.jobIterations': false, + 'jobConfig.jobIterations': true, 'jobConfig.jobPause': true, + 'jobConfig.jobType': true, 'jobConfig.maxWaitTimeout': true, + 'jobConfig.name': true, 'jobConfig.namespace': true, 'jobConfig.namespaced': true, - 'jobConfig.namespacedIterations': false, + 'jobConfig.namespacedIterations': true, 'jobConfig.objects': true, + 'jobConfig.preLoadImages': true, 'jobConfig.preLoadPeriod': true, + 'jobConfig.qps': true, 'jobConfig.verifyObjects': true, 'jobConfig.waitFor': true, 'jobConfig.waitForDeletion': true, 'jobConfig.waitWhenFinished': true, k8sVersion: true, metricName: true, - ocp_version: true, - platform: false, - sdn_type: false, + ocpMajorVersion: true, + ocpVersion: true, sort: true, timestamp: true, - total_nodes: false, - uuid: false, + version: true, workload: true, - workload_nodes_count: true, - workload_nodes_type: true, + churnStartTimestamp: true, + churnEndTimestamp: true, + publish: true, + ipsecMode: true, }, indexByName: { + timestamp: 0, _id: 1, _index: 2, _type: 3, - benchmark: 5, - clusterName: 8, - endDate: 9, - highlight: 6, - infraNodesCount: 20, - infraNodesType: 21, - k8sVersion: 10, - masterNodesType: 16, - metricName: 13, - ocpVersion: 11, - passed: 15, - platform: 12, - sdnType: 14, - sort: 7, - timestamp: 0, - totalNodes: 17, uuid: 4, - workerNodesCount: 18, - workerNodesType: 19, + highlight: 5, + sort: 6, + clusterName: 7, + k8sVersion: 8, + ocpVersion: 9, + platform: 10, + region: 11, + metricName: 12, + sdnType: 13, + passed: 14, + masterNodesType: 15, + totalNodes: 16, + workerNodesCount: 17, + churnEndTimestamp: 18, + churnStartTimestamp: 19, + clusterType: 20, + controlPlaneArch: 21, + elapsedTime: 22, + endTimestamp: 23, + ipsecMode: 24, + 'jobConfig.burst': 25, + 'jobConfig.churnDelay': 26, + 'jobConfig.churnDeletionStrategy': 27, + 'jobConfig.churnDuration': 28, + 'jobConfig.churnPercent': 29, + 'jobConfig.cleanup': 30, + 'jobConfig.errorOnVerify': 31, + 'jobConfig.iterationsPerNamespace': 32, + 'jobConfig.jobIterations': 33, + 'jobConfig.jobType': 34, + 'jobConfig.maxWaitTimeout': 35, + 'jobConfig.name': 36, + 'jobConfig.namespace': 37, + 'jobConfig.namespacedIterations': 38, + 'jobConfig.preLoadImages': 39, + 'jobConfig.preLoadPeriod': 40, + 'jobConfig.qps': 41, + 'jobConfig.verifyObjects': 42, + 'jobConfig.waitForDeletion': 43, + 'jobConfig.waitWhenFinished': 44, + masterNodesCount: 45, + ocpMajorVersion: 46, + publish: 47, + version: 48, + workerArch: 49, }, renameByName: { + _index: '', _type: '', clusterName: 'Cluster', - elapsedTime: 'Elapsed time', + elapsedTime: '', endDate: '', infraNodesCount: 'infra count', infraNodesType: 'infra type', - infra_nodes_count: 'Infra nodes', - infra_nodes_type: 'Infra flavor', - 'jobConfig.burst': 'Burst', - 'jobConfig.cleanup': '', - 'jobConfig.errorOnVerify': 'errorOnVerify', - 'jobConfig.jobIterationDelay': 'jobIterationDelay', - 'jobConfig.jobIterations': 'Iterations', - 'jobConfig.jobPause': 'jobPause', - 'jobConfig.jobType': 'Job Type', - 'jobConfig.maxWaitTimeout': 'maxWaitTImeout', - 'jobConfig.name': 'Name', - 'jobConfig.namespace': 'namespacePrefix', - 'jobConfig.namespaced': '', - 'jobConfig.namespacedIterations': 'Namespaced iterations', - 'jobConfig.objects': '', - 'jobConfig.podWait': 'podWait', - 'jobConfig.preLoadImages': 'Preload Images', - 'jobConfig.preLoadPeriod': '', - 'jobConfig.qps': 'QPS', - 'jobConfig.verifyObjects': '', k8sVersion: 'k8s version', - k8s_version: 'k8s version', masterNodesType: 'master type', - master_nodes_count: 'Master nodes', - master_nodes_type: 'Masters flavor', metricName: '', ocpVersion: 'OCP version', passed: 'Passed', platform: 'Platform', result: 'Result', sdnType: 'SDN', - sdn_type: 'SDN', timestamp: '', totalNodes: 'total nodes', - total_nodes: 'Total nodes', uuid: 'UUID', + version: '', workerNodesCount: 'worker count', workerNodesType: 'worker type', - worker_nodes_count: 'Worker nodes', - worker_nodes_type: 'Workers flavor', workload: '', - workload_nodes_count: 'Workload nodes', - workload_nodes_type: 'Workload flavor', + region: 'Region', }, }, }, @@ -176,7 +184,7 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn }, ]), - withGarbageCollection(title, unit, targets, gridPos): + withJobSummary(title, unit, targets, gridPos): self.base(title, unit, targets, gridPos) + table.queryOptions.withTransformations([ { @@ -186,6 +194,7 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn _id: true, _index: true, _type: true, + endTimestamp: true, highlight: true, 'jobConfig.churnDelay': true, 'jobConfig.churnDuration': true, @@ -194,11 +203,9 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn 'jobConfig.errorOnVerify': true, 'jobConfig.iterationsPerNamespace': true, 'jobConfig.jobIterationDelay': true, - 'jobConfig.jobIterations': false, 'jobConfig.jobPause': true, 'jobConfig.jobType': true, 'jobConfig.maxWaitTimeout': true, - 'jobConfig.name': false, 'jobConfig.namespace': true, 'jobConfig.namespaceLabels.pod-security.kubernetes.io/audit': true, 'jobConfig.namespaceLabels.pod-security.kubernetes.io/enforce': true, @@ -214,17 +221,27 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn 'jobConfig.waitFor': true, 'jobConfig.waitForDeletion': true, 'jobConfig.waitWhenFinished': true, - 'metadata.cloud-bulldozer': true, - 'metadata.k8sVersion': true, - 'metadata.ocpMajorVersion': true, - 'metadata.ocpVersion': true, - 'metadata.platform': true, - 'metadata.sdnType': true, - 'metadata.totalNodes': true, + k8sVersion: true, metricName: true, + ocpMajorVersion: true, + ocpVersion: true, + platform: true, + sdnType: true, sort: true, - timestamp: false, - uuid: false, + totalNodes: true, + churnStartTimestamp: true, + churnEndTimestamp: true, + clusterName: true, + clusterType: true, + controlPlaneArch: true, + ipsecMode: true, + masterNodesCount: true, + masterNodesType: true, + publish: true, + region: true, + workerArch: true, + workerNodesCount: true, + passed: true, }, indexByName: { _id: 2, @@ -250,23 +267,22 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn 'jobConfig.verifyObjects': 15, 'jobConfig.waitForDeletion': 16, 'jobConfig.waitWhenFinished': 17, - 'metadata.k8sVersion': 26, - 'metadata.ocpMajorVersion': 27, - 'metadata.ocpVersion': 28, - 'metadata.platform': 29, - 'metadata.sdnType': 30, - 'metadata.totalNodes': 31, + k8sVersion: 26, metricName: 18, + ocpMajorVersion: 27, + ocpVersion: 28, + platform: 29, + sdnType: 30, sort: 32, timestamp: 1, + totalNodes: 31, uuid: 0, version: 33, }, renameByName: { _type: '', elapsedTime: 'Elapsed time', - elapsedTimeNs: 'Elapsed Time', - endTimestamp: '', + endTimestamp: 'End date', highlight: '', 'jobConfig.burst': 'Burst', 'jobConfig.churn': 'Churn', @@ -291,8 +307,6 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn 'jobConfig.preLoadPeriod': '', 'jobConfig.qps': 'QPS', 'jobConfig.verifyObjects': '', - 'metadata.ocpMajorVersion': 'Major version', - 'metadata.platform': 'Platform', metricName: '', timestamp: 'Date', uuid: 'UUID', @@ -307,18 +321,6 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn id: 'byName', options: 'Elapsed time', }, - properties: [ - { - id: 'unit', - value: 's', - }, - ], - }, - { - matcher: { - id: 'byName', - options: 'Elapsed Time', - }, properties: [ { id: 'unit', @@ -326,16 +328,6 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn }, ], }, - ]) - + table.standardOptions.thresholds.withSteps([ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, ]), }, @@ -528,6 +520,4 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn + options.legend.withSortDesc(true), }, - - } diff --git a/assets/kube-burner-report-mode/queries.libsonnet b/assets/kube-burner-report-mode/queries.libsonnet index 5fd732b..f7c31f1 100644 --- a/assets/kube-burner-report-mode/queries.libsonnet +++ b/assets/kube-burner-report-mode/queries.libsonnet @@ -4,7 +4,7 @@ local elasticsearch = g.query.elasticsearch; { - benchmarkOveriew: { + platformOverview: { query(): elasticsearch.withAlias('') + elasticsearch.withBucketAggs([]) @@ -12,11 +12,11 @@ local elasticsearch = g.query.elasticsearch; elasticsearch.metrics.MetricAggregationWithSettings.RawData.settings.withSize('500') + elasticsearch.metrics.MetricAggregationWithSettings.RawData.withType('raw_data'), ]) - + elasticsearch.withQuery('uuid.keyword: $uuid AND metricName.keyword: clusterMetadata') + + elasticsearch.withQuery('uuid.keyword: $uuid AND metricName.keyword: jobSummary') + elasticsearch.withTimeField('timestamp'), }, - garbageCollection: { + jobSummary: { query(): elasticsearch.withAlias('') + elasticsearch.withBucketAggs([]) diff --git a/assets/kube-burner-report-mode/variables.libsonnet b/assets/kube-burner-report-mode/variables.libsonnet index 910ad07..adc1547 100644 --- a/assets/kube-burner-report-mode/variables.libsonnet +++ b/assets/kube-burner-report-mode/variables.libsonnet @@ -33,16 +33,16 @@ local var = g.dashboard.variable; + var.query.selectionOptions.withIncludeAll(true) + var.query.generalOptions.withLabel('Cluster Type'), - benchmark: - var.query.new('benchmark', '{"find": "terms", "field": "benchmark.keyword", "query": "platform.keyword: $platform AND sdnType.keyword: $sdn AND clusterType.keyword: $clusterType"}') + job: + var.query.new('job', '{"find": "terms", "field": "jobConfig.name.keyword", "query": "platform.keyword: $platform AND sdnType.keyword: $sdn AND clusterType.keyword: $clusterType"}') + var.query.withDatasourceFromVariable(self.Datasource) + var.query.withRefresh(1) + var.query.selectionOptions.withMulti(false) + var.query.selectionOptions.withIncludeAll(false) - + var.query.generalOptions.withLabel('Benchmark'), + + var.query.generalOptions.withLabel('Job'), workerNodesCount: - var.query.new('workerNodesCount', '{"find": "terms", "field": "workerNodesCount", "query": "platform.keyword: $platform AND sdnType.keyword: $sdn AND benchmark.keyword: $benchmark AND clusterType.keyword: $clusterType"}') + var.query.new('workerNodesCount', '{"find": "terms", "field": "workerNodesCount", "query": "platform.keyword: $platform AND sdnType.keyword: $sdn AND jobConfig.name.keyword: $job AND clusterType.keyword: $clusterType"}') + var.query.withDatasourceFromVariable(self.Datasource) + var.query.withRefresh(1) + var.query.selectionOptions.withMulti(false) @@ -50,7 +50,7 @@ local var = g.dashboard.variable; + var.query.generalOptions.withLabel('Workers'), ocpMajorVersion: - var.query.new('ocpMajorVersion', '{"find": "terms", "field": "ocpMajorVersion.keyword", "query": "platform.keyword: $platform AND sdnType.keyword: $sdn AND benchmark.keyword: $benchmark AND workerNodesCount: $workerNodesCount AND clusterType.keyword: $clusterType"}') + var.query.new('ocpMajorVersion', '{"find": "terms", "field": "ocpMajorVersion.keyword", "query": "platform.keyword: $platform AND sdnType.keyword: $sdn AND jobConfig.name.keyword: $job AND workerNodesCount: $workerNodesCount AND clusterType.keyword: $clusterType"}') + var.query.withDatasourceFromVariable(self.Datasource) + var.query.withRefresh(1) + var.query.selectionOptions.withMulti(true) @@ -58,7 +58,7 @@ local var = g.dashboard.variable; + var.query.generalOptions.withLabel('OCP Major'), uuid: - var.query.new('uuid', '{"find": "terms", "field": "uuid.keyword", "query": "platform.keyword: $platform AND sdnType.keyword: $sdn AND benchmark.keyword: $benchmark AND workerNodesCount: $workerNodesCount AND ocpMajorVersion.keyword: $ocpMajorVersion AND clusterType.keyword: $clusterType"}') + var.query.new('uuid', '{"find": "terms", "field": "uuid.keyword", "query": "platform.keyword: $platform AND sdnType.keyword: $sdn AND jobConfig.name.keyword: $job AND workerNodesCount: $workerNodesCount AND ocpMajorVersion.keyword: $ocpMajorVersion AND clusterType.keyword: $clusterType"}') + var.query.withDatasourceFromVariable(self.Datasource) + var.query.withRefresh(1) + var.query.selectionOptions.withMulti(true) @@ -66,7 +66,7 @@ local var = g.dashboard.variable; + var.query.generalOptions.withLabel('UUID'), compare_by: - var.custom.new('compare_by', ['uuid', 'metadata.ocpVersion', 'metadata.ocpMajorVersion']) + var.custom.new('compare_by', ['uuid', '.ocpVersion', 'ocpMajorVersion']) + var.custom.generalOptions.withLabel('Compare by') + var.custom.selectionOptions.withIncludeAll(false) + var.custom.selectionOptions.withMulti(false), diff --git a/assets/kube-burner-report-ocp-wrapper/panels.libsonnet b/assets/kube-burner-report-ocp-wrapper/panels.libsonnet index c10e8e7..fd2a7cc 100644 --- a/assets/kube-burner-report-ocp-wrapper/panels.libsonnet +++ b/assets/kube-burner-report-ocp-wrapper/panels.libsonnet @@ -544,9 +544,8 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn }, ]), - withJobSummary(title, unit, targets, gridPos): + withPlatformOverview(title, unit, targets, gridPos): self.base(title, unit, targets, gridPos) - + table.options.withSortBy([]) + table.queryOptions.withTransformations([ { id: 'organize', @@ -555,103 +554,125 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn _id: true, _index: true, _type: true, + clustertype: true, + elapsedTime: true, + endDate: true, + endTimestamp: true, highlight: true, + 'jobConfig.burst': true, 'jobConfig.churnDelay': true, + 'jobConfig.churnDeletionStrategy': true, 'jobConfig.churnDuration': true, 'jobConfig.churnPercent': true, 'jobConfig.cleanup': true, 'jobConfig.errorOnVerify': true, + 'jobConfig.iterationsPerNamespace': true, 'jobConfig.jobIterationDelay': true, - 'jobConfig.jobIterations': false, + 'jobConfig.jobIterations': true, 'jobConfig.jobPause': true, 'jobConfig.jobType': true, 'jobConfig.maxWaitTimeout': true, 'jobConfig.name': true, 'jobConfig.namespace': true, - 'jobConfig.namespaceLabels.pod-security.kubernetes.io/audit': true, - 'jobConfig.namespaceLabels.pod-security.kubernetes.io/enforce': true, - 'jobConfig.namespaceLabels.pod-security.kubernetes.io/warn': true, - 'jobConfig.namespaceLabels.security.openshift.io/scc.podSecurityLabelSync': true, 'jobConfig.namespaced': true, 'jobConfig.namespacedIterations': true, 'jobConfig.objects': true, - 'jobConfig.podWait': true, 'jobConfig.preLoadImages': true, 'jobConfig.preLoadPeriod': true, + 'jobConfig.qps': true, 'jobConfig.verifyObjects': true, 'jobConfig.waitFor': true, 'jobConfig.waitForDeletion': true, 'jobConfig.waitWhenFinished': true, - 'metadata.cloud-bulldozer': true, - 'metadata.k8sVersion': true, - 'metadata.ocpVersion': true, - 'metadata.platform': true, - 'metadata.sdnType': true, - 'metadata.totalNodes': true, + k8sVersion: true, metricName: true, + ocpMajorVersion: true, + ocpVersion: true, sort: true, timestamp: true, - uuid: false, + version: true, + workload: true, + churnStartTimestamp: true, + churnEndTimestamp: true, + publish: true, + ipsecMode: true, }, indexByName: { + timestamp: 0, _id: 1, _index: 2, _type: 3, - elapsedTime: 8, - 'jobConfig.burst': 7, - 'jobConfig.cleanup': 12, - 'jobConfig.errorOnVerify': 13, - 'jobConfig.jobIterationDelay': 14, - 'jobConfig.jobIterations': 9, - 'jobConfig.jobPause': 15, - 'jobConfig.jobType': 10, - 'jobConfig.maxWaitTimeout': 16, - 'jobConfig.name': 5, - 'jobConfig.namespace': 17, - 'jobConfig.namespacedIterations': 18, - 'jobConfig.objects': 19, - 'jobConfig.podWait': 11, - 'jobConfig.qps': 6, - 'jobConfig.verifyObjects': 20, - 'jobConfig.waitFor': 21, - 'jobConfig.waitForDeletion': 22, - 'jobConfig.waitWhenFinished': 23, - metricName: 24, - timestamp: 0, uuid: 4, + highlight: 5, + sort: 6, + clusterName: 7, + k8sVersion: 8, + ocpVersion: 9, + platform: 10, + region: 11, + metricName: 12, + sdnType: 13, + passed: 14, + masterNodesType: 15, + totalNodes: 16, + workerNodesCount: 17, + churnEndTimestamp: 18, + churnStartTimestamp: 19, + clusterType: 20, + controlPlaneArch: 21, + elapsedTime: 22, + endTimestamp: 23, + ipsecMode: 24, + 'jobConfig.burst': 25, + 'jobConfig.churnDelay': 26, + 'jobConfig.churnDeletionStrategy': 27, + 'jobConfig.churnDuration': 28, + 'jobConfig.churnPercent': 29, + 'jobConfig.cleanup': 30, + 'jobConfig.errorOnVerify': 31, + 'jobConfig.iterationsPerNamespace': 32, + 'jobConfig.jobIterations': 33, + 'jobConfig.jobType': 34, + 'jobConfig.maxWaitTimeout': 35, + 'jobConfig.name': 36, + 'jobConfig.namespace': 37, + 'jobConfig.namespacedIterations': 38, + 'jobConfig.preLoadImages': 39, + 'jobConfig.preLoadPeriod': 40, + 'jobConfig.qps': 41, + 'jobConfig.verifyObjects': 42, + 'jobConfig.waitForDeletion': 43, + 'jobConfig.waitWhenFinished': 44, + masterNodesCount: 45, + ocpMajorVersion: 46, + publish: 47, + version: 48, + workerArch: 49, }, renameByName: { + _index: '', _type: '', - elapsedTime: 'Elapsed time', - elapsedTimeNs: 'Elapsed Time', - highlight: '', - 'jobConfig.burst': 'Burst', - 'jobConfig.churn': 'Churn', - 'jobConfig.churnDelay': '', - 'jobConfig.cleanup': '', - 'jobConfig.errorOnVerify': 'errorOnVerify', - 'jobConfig.iterationsPerNamespace': 'iterationsPerNs', - 'jobConfig.jobIterationDelay': 'jobIterationDelay', - 'jobConfig.jobIterations': 'Iterations', - 'jobConfig.jobPause': 'jobPause', - 'jobConfig.jobType': 'Job Type', - 'jobConfig.maxWaitTimeout': 'maxWaitTImeout', - 'jobConfig.name': 'Name', - 'jobConfig.namespace': 'namespacePrefix', - 'jobConfig.namespaceLabels.pod-security.kubernetes.io/audit': '', - 'jobConfig.namespaced': '', - 'jobConfig.namespacedIterations': 'Namespaced iterations', - 'jobConfig.objects': '', - 'jobConfig.podWait': 'podWait', - 'jobConfig.preLoadImages': 'Preload Images', - 'jobConfig.preLoadPeriod': '', - 'jobConfig.qps': 'QPS', - 'jobConfig.verifyObjects': '', - 'metadata.platform': 'Platform', + clusterName: 'Cluster', + elapsedTime: '', + endDate: '', + infraNodesCount: 'infra count', + infraNodesType: 'infra type', + k8sVersion: 'k8s version', + masterNodesType: 'master type', metricName: '', + ocpVersion: 'OCP version', + passed: 'Passed', + platform: 'Platform', + result: 'Result', + sdnType: 'SDN', timestamp: '', + totalNodes: 'total nodes', uuid: 'UUID', - version: 'Kube-burner version', + version: '', + workerNodesCount: 'worker count', + workerNodesType: 'worker type', + workload: '', + region: 'Region', }, }, }, @@ -660,32 +681,19 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn { matcher: { id: 'byName', - options: 'Elapsed time', - }, - properties: [ - { - id: 'unit', - value: 's', - }, - ], - }, - { - matcher: { - id: 'byName', - options: 'Elapsed Time', + options: 'passed', }, properties: [ { - id: 'unit', - value: 'ns', + id: 'custom.cellOptions', + value: { + mode: 'basic', + type: 'color-background', + }, }, ], }, - ]), - - withClusterMetadata(title, unit, targets, gridPos): - self.base(title, unit, targets, gridPos) - + table.options.withSortBy([]) + ]) + table.standardOptions.withMappings([ { options: { @@ -697,6 +705,15 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn type: 'value', }, ]) + + table.standardOptions.thresholds.withSteps([ + { + color: 'green', + value: null, + }, + ]), + + withJobSummary(title, unit, targets, gridPos): + self.base(title, unit, targets, gridPos) + table.queryOptions.withTransformations([ { id: 'organize', @@ -705,74 +722,103 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn _id: true, _index: true, _type: true, - benchmark: false, - clustertype: true, - endDate: true, - end_date: true, + endTimestamp: true, highlight: true, + 'jobConfig.churnDelay': true, + 'jobConfig.churnDuration': true, + 'jobConfig.churnPercent': true, 'jobConfig.cleanup': true, 'jobConfig.errorOnVerify': true, + 'jobConfig.iterationsPerNamespace': true, 'jobConfig.jobIterationDelay': true, - 'jobConfig.jobIterations': false, 'jobConfig.jobPause': true, + 'jobConfig.jobType': true, 'jobConfig.maxWaitTimeout': true, 'jobConfig.namespace': true, + 'jobConfig.namespaceLabels.pod-security.kubernetes.io/audit': true, + 'jobConfig.namespaceLabels.pod-security.kubernetes.io/enforce': true, + 'jobConfig.namespaceLabels.pod-security.kubernetes.io/warn': true, + 'jobConfig.namespaceLabels.security.openshift.io/scc.podSecurityLabelSync': true, 'jobConfig.namespaced': true, - 'jobConfig.namespacedIterations': false, + 'jobConfig.namespacedIterations': true, 'jobConfig.objects': true, + 'jobConfig.podWait': true, + 'jobConfig.preLoadImages': true, 'jobConfig.preLoadPeriod': true, 'jobConfig.verifyObjects': true, 'jobConfig.waitFor': true, 'jobConfig.waitForDeletion': true, 'jobConfig.waitWhenFinished': true, + k8sVersion: true, metricName: true, - ocp_version: true, - platform: false, - sdn_type: false, + ocpMajorVersion: true, + ocpVersion: true, + platform: true, + sdnType: true, sort: true, - timestamp: true, - total_nodes: false, - uuid: true, - workload: true, - workload_nodes_count: true, - workload_nodes_type: true, + totalNodes: true, + churnStartTimestamp: true, + churnEndTimestamp: true, + clusterName: true, + clusterType: true, + controlPlaneArch: true, + ipsecMode: true, + masterNodesCount: true, + masterNodesType: true, + publish: true, + region: true, + workerArch: true, + workerNodesCount: true, + passed: true, }, indexByName: { - _id: 1, - _index: 2, - _type: 3, - benchmark: 5, - clusterName: 8, - endDate: 9, - highlight: 6, - infraNodesCount: 20, - infraNodesType: 21, - k8sVersion: 10, - masterNodesType: 16, - metricName: 13, - ocpVersion: 11, - passed: 15, - platform: 12, - sdnType: 14, - sort: 7, - timestamp: 0, - totalNodes: 17, - uuid: 4, - workerNodesCount: 18, - workerNodesType: 19, + _id: 2, + _index: 3, + _type: 4, + elapsedTime: 8, + highlight: 19, + 'jobConfig.burst': 7, + 'jobConfig.churnDelay': 20, + 'jobConfig.churnDuration': 21, + 'jobConfig.churnPercent': 22, + 'jobConfig.cleanup': 11, + 'jobConfig.errorOnVerify': 12, + 'jobConfig.iterationsPerNamespace': 23, + 'jobConfig.jobIterations': 9, + 'jobConfig.jobType': 10, + 'jobConfig.maxWaitTimeout': 13, + 'jobConfig.name': 5, + 'jobConfig.namespace': 14, + 'jobConfig.preLoadImages': 24, + 'jobConfig.preLoadPeriod': 25, + 'jobConfig.qps': 6, + 'jobConfig.verifyObjects': 15, + 'jobConfig.waitForDeletion': 16, + 'jobConfig.waitWhenFinished': 17, + k8sVersion: 26, + metricName: 18, + ocpMajorVersion: 27, + ocpVersion: 28, + platform: 29, + sdnType: 30, + sort: 32, + timestamp: 1, + totalNodes: 31, + uuid: 0, + version: 33, }, renameByName: { _type: '', - clusterName: 'Cluster', elapsedTime: 'Elapsed time', - endDate: '', - infraNodesCount: 'infra count', - infraNodesType: 'infra type', - infra_nodes_count: 'Infra nodes', - infra_nodes_type: 'Infra flavor', + endTimestamp: 'End date', + highlight: '', 'jobConfig.burst': 'Burst', + 'jobConfig.churn': 'Churn', + 'jobConfig.churnDelay': '', + 'jobConfig.churnDeletionStrategy': 'Churn Deletion strategy', 'jobConfig.cleanup': '', 'jobConfig.errorOnVerify': 'errorOnVerify', + 'jobConfig.iterationsPerNamespace': 'iterationsPerNs', 'jobConfig.jobIterationDelay': 'jobIterationDelay', 'jobConfig.jobIterations': 'Iterations', 'jobConfig.jobPause': 'jobPause', @@ -780,6 +826,7 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn 'jobConfig.maxWaitTimeout': 'maxWaitTImeout', 'jobConfig.name': 'Name', 'jobConfig.namespace': 'namespacePrefix', + 'jobConfig.namespaceLabels.pod-security.kubernetes.io/audit': '', 'jobConfig.namespaced': '', 'jobConfig.namespacedIterations': 'Namespaced iterations', 'jobConfig.objects': '', @@ -788,29 +835,10 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn 'jobConfig.preLoadPeriod': '', 'jobConfig.qps': 'QPS', 'jobConfig.verifyObjects': '', - k8sVersion: 'k8s version', - k8s_version: 'k8s version', - masterNodesType: 'master type', - master_nodes_count: 'Master nodes', - master_nodes_type: 'Masters flavor', metricName: '', - ocpVersion: 'OCP version', - passed: 'Passed', - platform: 'Platform', - result: 'Result', - sdnType: 'SDN', - sdn_type: 'SDN', - timestamp: '', - totalNodes: 'total nodes', - total_nodes: 'Total nodes', + timestamp: 'Date', uuid: 'UUID', - workerNodesCount: 'worker count', - workerNodesType: 'worker type', - worker_nodes_count: 'Worker nodes', - worker_nodes_type: 'Workers flavor', - workload: '', - workload_nodes_count: 'Workload nodes', - workload_nodes_type: 'Workload flavor', + version: 'Kube-burner version', }, }, }, @@ -819,15 +847,12 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn { matcher: { id: 'byName', - options: 'passed', + options: 'Elapsed time', }, properties: [ { - id: 'custom.cellOptions', - value: { - mode: 'basic', - type: 'color-background', - }, + id: 'unit', + value: 'ns', }, ], }, diff --git a/assets/kube-burner-report-ocp-wrapper/queries.libsonnet b/assets/kube-burner-report-ocp-wrapper/queries.libsonnet index ae84aad..95db446 100644 --- a/assets/kube-burner-report-ocp-wrapper/queries.libsonnet +++ b/assets/kube-burner-report-ocp-wrapper/queries.libsonnet @@ -515,33 +515,29 @@ local elasticsearch = g.query.elasticsearch; + elasticsearch.metrics.MetricAggregationWithSettings.RawData.settings.withSize('500') + elasticsearch.metrics.MetricAggregationWithSettings.RawData.withType('raw_data'), ]) - + elasticsearch.withQuery('uuid.keyword: $uuid AND metricName.keyword: "etcdVersion"') + + elasticsearch.withQuery('uuid.keyword: $uuid AND metricName.keyword: jobSummary') + elasticsearch.withTimeField('timestamp'), }, - jobSummary: { + platformOverview: { query(): elasticsearch.withAlias('') - + elasticsearch.withHide(false) + elasticsearch.withBucketAggs([]) + elasticsearch.withMetrics([ - elasticsearch.metrics.MetricAggregationWithSettings.RawData.withId('1') - + elasticsearch.metrics.MetricAggregationWithSettings.RawData.settings.withSize('500') + elasticsearch.metrics.MetricAggregationWithSettings.RawData.settings.withSize('500') + elasticsearch.metrics.MetricAggregationWithSettings.RawData.withType('raw_data'), ]) + elasticsearch.withQuery('uuid.keyword: $uuid AND metricName.keyword: jobSummary') + elasticsearch.withTimeField('timestamp'), }, - clusterMetadata: { + jobSummary: { query(): elasticsearch.withAlias('') - + elasticsearch.withHide(false) + elasticsearch.withBucketAggs([]) + elasticsearch.withMetrics([ - elasticsearch.metrics.MetricAggregationWithSettings.RawData.withId('1') - + elasticsearch.metrics.MetricAggregationWithSettings.RawData.settings.withSize('500') + elasticsearch.metrics.MetricAggregationWithSettings.RawData.settings.withSize('500') + elasticsearch.metrics.MetricAggregationWithSettings.RawData.withType('raw_data'), ]) - + elasticsearch.withQuery('uuid.keyword: $uuid AND metricName.keyword: clusterMetadata') + + elasticsearch.withQuery('uuid.keyword: $uuid AND metricName.keyword: jobSummary') + elasticsearch.withTimeField('timestamp'), }, alerts: { diff --git a/assets/kube-burner-report-ocp-wrapper/variables.libsonnet b/assets/kube-burner-report-ocp-wrapper/variables.libsonnet index 9d3d9a6..17eab0e 100644 --- a/assets/kube-burner-report-ocp-wrapper/variables.libsonnet +++ b/assets/kube-burner-report-ocp-wrapper/variables.libsonnet @@ -8,7 +8,7 @@ local var = g.dashboard.variable; + var.query.generalOptions.withLabel('Datasource'), platform: - var.query.new('platform', '{"find": "terms", "field": "metadata.platform.keyword"}') + var.query.new('platform', '{"find": "terms", "field": "platform.keyword"}') + var.query.withDatasourceFromVariable(self.Datasource) + var.query.withRefresh(2) + var.query.selectionOptions.withMulti() @@ -16,23 +16,23 @@ local var = g.dashboard.variable; + var.query.generalOptions.withLabel('Platform'), sdn: - var.query.new('sdn', '{"find": "terms", "field": "metadata.sdnType.keyword", "query": "metadata.platform.keyword: $platform"}') + var.query.new('sdn', '{"find": "terms", "field": "sdnType.keyword", "query": "platform.keyword: $platform"}') + var.query.withDatasourceFromVariable(self.Datasource) + var.query.withRefresh(1) + var.query.selectionOptions.withMulti() + var.query.selectionOptions.withIncludeAll(false) + var.query.generalOptions.withLabel('SDN type'), - workload: - var.query.new('workload', '{"find": "terms", "field": "jobConfig.name.keyword", "query": "metadata.platform.keyword: $platform AND metadata.sdnType.keyword: $sdn"}') + job: + var.query.new('job', '{"find": "terms", "field": "jobConfig.name.keyword", "query": "platform.keyword: $platform AND sdnType.keyword: $sdn"}') + var.query.withDatasourceFromVariable(self.Datasource) + var.query.withRefresh(1) + var.query.selectionOptions.withMulti(false) + var.query.selectionOptions.withIncludeAll(false) - + var.query.generalOptions.withLabel('Workload'), + + var.query.generalOptions.withLabel('Job'), nodes: - var.query.new('nodes', '{"find": "terms", "field": "metadata.totalNodes", "query": "metadata.platform.keyword: $platform AND metadata.sdnType.keyword: $sdn AND jobConfig.name.keyword: $workload"}') + var.query.new('nodes', '{"find": "terms", "field": "totalNodes", "query": "platform.keyword: $platform AND sdnType.keyword: $sdn AND jobConfig.name.keyword: $job"}') + var.query.withDatasourceFromVariable(self.Datasource) + var.query.withRefresh(1) + var.query.selectionOptions.withMulti(false) @@ -40,7 +40,7 @@ local var = g.dashboard.variable; + var.query.generalOptions.withLabel('nodes'), uuid: - var.query.new('uuid', '{"find": "terms", "field": "uuid.keyword", "query": "metadata.platform.keyword: $platform AND metadata.sdnType.keyword: $sdn AND jobConfig.name.keyword: $workload AND metadata.totalNodes: $nodes"}') + var.query.new('uuid', '{"find": "terms", "field": "uuid.keyword", "query": "platform.keyword: $platform AND sdnType.keyword: $sdn AND jobConfig.name.keyword: $job AND totalNodes: $nodes"}') + var.query.withDatasourceFromVariable(self.Datasource) + var.query.withRefresh(2) + var.query.selectionOptions.withMulti(false) diff --git a/templates/CPT/kube-burner-report-mode.jsonnet b/templates/CPT/kube-burner-report-mode.jsonnet index 2db9881..1dea828 100644 --- a/templates/CPT/kube-burner-report-mode.jsonnet +++ b/templates/CPT/kube-burner-report-mode.jsonnet @@ -14,14 +14,14 @@ g.dashboard.new('Kube-burner Report Mode') + g.dashboard.timepicker.withRefreshIntervals(['5s', '10s', '30s', '1m', '5m', '15m', '30m', '1h', '2h', '1d']) + g.dashboard.timepicker.withTimeOptions(['5m', '15m', '1h', '6h', '12h', '24h', '2d', '7d', '30d']) + g.dashboard.withRefresh('') -+ g.dashboard.withEditable(true) ++ g.dashboard.withEditable(false) + g.dashboard.graphTooltip.withSharedCrosshair() + g.dashboard.withVariables([ variables.Datasource, variables.platform, variables.sdn, variables.clusterType, - variables.benchmark, + variables.job, variables.workerNodesCount, variables.ocpMajorVersion, variables.uuid, @@ -30,8 +30,8 @@ g.dashboard.new('Kube-burner Report Mode') variables.node_roles, ]) + g.dashboard.withPanels([ - panels.table.withBenchmarkOverview('', '', queries.benchmarkOveriew.query(), { x: 6, y: 0, w: 24, h: 6 }), - panels.table.withGarbageCollection('', '', queries.garbageCollection.query(), { x: 0, y: 6, w: 24, h: 5 }), + panels.table.withPlatformOverview('', '', queries.platformOverview.query(), { x: 6, y: 0, w: 24, h: 6 }), + panels.table.withJobSummary('', '', queries.jobSummary.query(), { x: 0, y: 6, w: 24, h: 5 }), g.panel.row.new('Node Usage') + g.panel.row.withGridPos({ x: 0, y: 14, w: 24, h: 1 }) + g.panel.row.withCollapsed(true) diff --git a/templates/CPT/kube-burner-report-ocp-wrapper.jsonnet b/templates/CPT/kube-burner-report-ocp-wrapper.jsonnet index 22f9f22..4ced8f0 100644 --- a/templates/CPT/kube-burner-report-ocp-wrapper.jsonnet +++ b/templates/CPT/kube-burner-report-ocp-wrapper.jsonnet @@ -20,7 +20,7 @@ g.dashboard.new('Kube-burner Report - OCP wrapper') variables.Datasource, variables.platform, variables.sdn, - variables.workload, + variables.job, variables.nodes, variables.uuid, variables.master, @@ -31,10 +31,10 @@ g.dashboard.new('Kube-burner Report - OCP wrapper') + g.dashboard.withPanels([ panels.stat.withLastNotNullCalcs('Node count', 'none', queries.nodeCount.query(), { x: 0, y: 0, w: 4, h: 3 }), panels.stat.withLastNotNullCalcs('', '', queries.aggregatesCount.queries(), { x: 4, y: 0, w: 12, h: 3 }), - panels.stat.withFieldSummary('OpenShift version', '', '/^metadata\\.ocpVersion$/', queries.openshiftVersion.query(), { x: 16, y: 0, w: 6, h: 3 }), + panels.stat.withFieldSummary('OpenShift version', '', 'ocpVersion', queries.openshiftVersion.query(), { x: 16, y: 0, w: 6, h: 3 }), panels.stat.withFieldSummary('Etcd version', '', '/^labels\\.cluster_version$/', queries.openshiftVersion.query(), { x: 22, y: 0, w: 2, h: 3 }), - panels.table.withJobSummary('', '', queries.jobSummary.query(), { x: 0, y: 3, w: 24, h: 3 }), - panels.table.withClusterMetadata('', '', queries.clusterMetadata.query(), { x: 0, y: 6, w: 24, h: 3 }), + panels.table.withPlatformOverview('', '', queries.platformOverview.query(), { x: 0, y: 3, w: 24, h: 3 }), + panels.table.withJobSummary('', '', queries.jobSummary.query(), { x: 0, y: 6, w: 24, h: 3 }), panels.table.withAlerts('Alerts', '', queries.alerts.query(), { x: 0, y: 9, w: 24, h: 4 }), g.panel.row.new('Cluster status') + g.panel.row.withGridPos({ x: 0, y: 14, w: 24, h: 1 })