Skip to content

Commit

Permalink
Adapt metadata queries to lastest kube-burner changes
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <[email protected]>
  • Loading branch information
rsevilla87 committed Jul 29, 2024
1 parent efabd4c commit 20e8dc6
Show file tree
Hide file tree
Showing 8 changed files with 746 additions and 779 deletions.
919 changes: 443 additions & 476 deletions assets/kube-burner-report-mode/panels.libsonnet

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions assets/kube-burner-report-mode/queries.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ local elasticsearch = g.query.elasticsearch;

{

benchmarkOveriew: {
platformOverview: {
query():
elasticsearch.withAlias("")
+ elasticsearch.withBucketAggs([])
+ elasticsearch.withMetrics([
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([])
Expand Down
16 changes: 8 additions & 8 deletions assets/kube-burner-report-mode/variables.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -33,40 +33,40 @@ 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)
+ var.query.selectionOptions.withIncludeAll(false)
+ 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)
+ var.query.selectionOptions.withIncludeAll(false)
+ 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)
+ var.query.selectionOptions.withIncludeAll(false)
+ 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),
Expand All @@ -82,4 +82,4 @@ local var = g.dashboard.variable;
+ var.custom.generalOptions.withLabel('Node roles')
+ var.custom.selectionOptions.withIncludeAll(false)
+ var.custom.selectionOptions.withMulti(true),
}
}
Loading

0 comments on commit 20e8dc6

Please sign in to comment.