Skip to content

Commit

Permalink
Reduce result size to report cluster's metadata
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <[email protected]>
  • Loading branch information
rsevilla87 committed Aug 30, 2024
1 parent 4481db9 commit fd3de77
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 28 deletions.
4 changes: 2 additions & 2 deletions assets/kube-burner-report-mode/queries.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ local elasticsearch = g.query.elasticsearch;
{

platformOverview: {
query():
query():
elasticsearch.withAlias("")
+ elasticsearch.withBucketAggs([])
+ elasticsearch.withMetrics([
elasticsearch.metrics.MetricAggregationWithSettings.RawData.settings.withSize("500")
elasticsearch.metrics.MetricAggregationWithSettings.RawData.settings.withSize("1")
+ elasticsearch.metrics.MetricAggregationWithSettings.RawData.withType('raw_data'),
])
+ elasticsearch.withQuery('uuid.keyword: $uuid AND metricName.keyword: jobSummary')
Expand Down
44 changes: 20 additions & 24 deletions assets/kube-burner-report-ocp-wrapper/queries.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -518,31 +518,27 @@ local elasticsearch = g.query.elasticsearch;
+ elasticsearch.withQuery("uuid.keyword: $uuid AND metricName.keyword: jobSummary")
+ elasticsearch.withTimeField('timestamp')
},
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.withType('raw_data'),
])
+ elasticsearch.withQuery("uuid.keyword: $uuid AND metricName.keyword: jobSummary")
+ elasticsearch.withTimeField('timestamp')
platformOverview: {
query():
elasticsearch.withAlias("")
+ elasticsearch.withBucketAggs([])
+ elasticsearch.withMetrics([
elasticsearch.metrics.MetricAggregationWithSettings.RawData.settings.withSize("1")
+ elasticsearch.metrics.MetricAggregationWithSettings.RawData.withType('raw_data'),
])
+ elasticsearch.withQuery('uuid.keyword: $uuid AND metricName.keyword: jobSummary')
+ elasticsearch.withTimeField('timestamp')
},
clusterMetadata: {
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.withType('raw_data'),
])
+ elasticsearch.withQuery("uuid.keyword: $uuid AND metricName.keyword: jobSummary")
+ elasticsearch.withTimeField('timestamp')
jobSummary: {
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: jobSummary')
+ elasticsearch.withTimeField('timestamp')
},
alerts: {
query():
Expand Down
4 changes: 2 additions & 2 deletions templates/CPT/kube-burner-report-ocp-wrapper.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ g.dashboard.new('Kube-burner Report - OCP wrapper')
panels.stat.withLastNotNullCalcs('', '', queries.aggregatesCount.queries(), { x: 4, y: 0, w: 12, 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.withPlatformOverview('', '', queries.jobSummary.query(), { x: 0, y: 3, w: 24, h: 3 }),
panels.table.withJobSummary('', '', 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 })
Expand Down

0 comments on commit fd3de77

Please sign in to comment.