diff --git a/assets/kube-burner-report-mode/queries.libsonnet b/assets/kube-burner-report-mode/queries.libsonnet index f9e3cd4..ae532e8 100644 --- a/assets/kube-burner-report-mode/queries.libsonnet +++ b/assets/kube-burner-report-mode/queries.libsonnet @@ -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') diff --git a/assets/kube-burner-report-ocp-wrapper/queries.libsonnet b/assets/kube-burner-report-ocp-wrapper/queries.libsonnet index a3c0267..897ea90 100644 --- a/assets/kube-burner-report-ocp-wrapper/queries.libsonnet +++ b/assets/kube-burner-report-ocp-wrapper/queries.libsonnet @@ -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(): diff --git a/templates/CPT/kube-burner-report-ocp-wrapper.jsonnet b/templates/CPT/kube-burner-report-ocp-wrapper.jsonnet index dbbe6c8..4ced8f0 100644 --- a/templates/CPT/kube-burner-report-ocp-wrapper.jsonnet +++ b/templates/CPT/kube-burner-report-ocp-wrapper.jsonnet @@ -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 })