mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
fix(slo): use comma separarted list of source index for transform (#166294)
This commit is contained in:
parent
a18c68f7ac
commit
c0417f4d9d
7 changed files with 33 additions and 15 deletions
|
@ -58,7 +58,7 @@ export const createKQLCustomIndicator = (
|
|||
): Indicator => ({
|
||||
type: 'sli.kql.custom',
|
||||
params: {
|
||||
index: 'my-index*',
|
||||
index: 'my-index*,my-other-index*',
|
||||
filter: 'labels.groupId: group-3',
|
||||
good: 'latency < 300',
|
||||
total: '',
|
||||
|
@ -72,7 +72,7 @@ export const createMetricCustomIndicator = (
|
|||
): MetricCustomIndicator => ({
|
||||
type: 'sli.metric.custom',
|
||||
params: {
|
||||
index: 'my-index*',
|
||||
index: 'my-index*,my-other-index*',
|
||||
filter: 'labels.groupId: group-3',
|
||||
good: {
|
||||
metrics: [
|
||||
|
@ -95,7 +95,7 @@ export const createHistogramIndicator = (
|
|||
): HistogramIndicator => ({
|
||||
type: 'sli.histogram.custom',
|
||||
params: {
|
||||
index: 'my-index*',
|
||||
index: 'my-index*,my-other-index*',
|
||||
filter: 'labels.groupId: group-3',
|
||||
good: {
|
||||
field: 'latency',
|
||||
|
|
|
@ -209,7 +209,10 @@ Object {
|
|||
"deduce_mappings": false,
|
||||
},
|
||||
"source": Object {
|
||||
"index": "my-index*",
|
||||
"index": Array [
|
||||
"my-index*",
|
||||
"my-other-index*",
|
||||
],
|
||||
"query": Object {
|
||||
"bool": Object {
|
||||
"minimum_should_match": 1,
|
||||
|
@ -449,7 +452,10 @@ Object {
|
|||
"deduce_mappings": false,
|
||||
},
|
||||
"source": Object {
|
||||
"index": "my-index*",
|
||||
"index": Array [
|
||||
"my-index*",
|
||||
"my-other-index*",
|
||||
],
|
||||
"query": Object {
|
||||
"bool": Object {
|
||||
"minimum_should_match": 1,
|
||||
|
|
|
@ -224,7 +224,10 @@ Object {
|
|||
"deduce_mappings": false,
|
||||
},
|
||||
"source": Object {
|
||||
"index": "my-index*",
|
||||
"index": Array [
|
||||
"my-index*",
|
||||
"my-other-index*",
|
||||
],
|
||||
"query": Object {
|
||||
"bool": Object {
|
||||
"minimum_should_match": 1,
|
||||
|
@ -438,7 +441,10 @@ Object {
|
|||
"deduce_mappings": false,
|
||||
},
|
||||
"source": Object {
|
||||
"index": "my-index*",
|
||||
"index": Array [
|
||||
"my-index*",
|
||||
"my-other-index*",
|
||||
],
|
||||
"query": Object {
|
||||
"bool": Object {
|
||||
"minimum_should_match": 1,
|
||||
|
|
|
@ -233,7 +233,10 @@ Object {
|
|||
"deduce_mappings": false,
|
||||
},
|
||||
"source": Object {
|
||||
"index": "my-index*",
|
||||
"index": Array [
|
||||
"my-index*",
|
||||
"my-other-index*",
|
||||
],
|
||||
"query": Object {
|
||||
"bool": Object {
|
||||
"minimum_should_match": 1,
|
||||
|
@ -485,7 +488,10 @@ Object {
|
|||
"deduce_mappings": false,
|
||||
},
|
||||
"source": Object {
|
||||
"index": "my-index*",
|
||||
"index": Array [
|
||||
"my-index*",
|
||||
"my-other-index*",
|
||||
],
|
||||
"query": Object {
|
||||
"bool": Object {
|
||||
"minimum_should_match": 1,
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
|
||||
import { InvalidTransformError } from '../../../errors';
|
||||
import { getSLOTransformTemplate } from '../../../assets/transform_templates/slo_transform_template';
|
||||
import { getElastichsearchQueryOrThrow, TransformGenerator } from '.';
|
||||
import { getElastichsearchQueryOrThrow, parseIndex, TransformGenerator } from '.';
|
||||
import {
|
||||
SLO_DESTINATION_INDEX_NAME,
|
||||
SLO_INGEST_PIPELINE_NAME,
|
||||
|
@ -47,7 +47,7 @@ export class HistogramTransformGenerator extends TransformGenerator {
|
|||
private buildSource(slo: SLO, indicator: HistogramIndicator) {
|
||||
const filter = getElastichsearchQueryOrThrow(indicator.params.filter);
|
||||
return {
|
||||
index: indicator.params.index,
|
||||
index: parseIndex(indicator.params.index),
|
||||
runtime_mappings: this.buildCommonRuntimeMappings(slo),
|
||||
query: filter,
|
||||
};
|
||||
|
|
|
@ -10,7 +10,7 @@ import { kqlCustomIndicatorSchema, timeslicesBudgetingMethodSchema } from '@kbn/
|
|||
|
||||
import { InvalidTransformError } from '../../../errors';
|
||||
import { getSLOTransformTemplate } from '../../../assets/transform_templates/slo_transform_template';
|
||||
import { getElastichsearchQueryOrThrow, TransformGenerator } from '.';
|
||||
import { getElastichsearchQueryOrThrow, parseIndex, TransformGenerator } from '.';
|
||||
import {
|
||||
SLO_DESTINATION_INDEX_NAME,
|
||||
SLO_INGEST_PIPELINE_NAME,
|
||||
|
@ -42,7 +42,7 @@ export class KQLCustomTransformGenerator extends TransformGenerator {
|
|||
private buildSource(slo: SLO, indicator: KQLCustomIndicator) {
|
||||
const filter = getElastichsearchQueryOrThrow(indicator.params.filter);
|
||||
return {
|
||||
index: indicator.params.index,
|
||||
index: parseIndex(indicator.params.index),
|
||||
runtime_mappings: this.buildCommonRuntimeMappings(slo),
|
||||
query: filter,
|
||||
};
|
||||
|
|
|
@ -10,7 +10,7 @@ import { metricCustomIndicatorSchema, timeslicesBudgetingMethodSchema } from '@k
|
|||
|
||||
import { InvalidTransformError } from '../../../errors';
|
||||
import { getSLOTransformTemplate } from '../../../assets/transform_templates/slo_transform_template';
|
||||
import { getElastichsearchQueryOrThrow, TransformGenerator } from '.';
|
||||
import { getElastichsearchQueryOrThrow, parseIndex, TransformGenerator } from '.';
|
||||
import {
|
||||
SLO_DESTINATION_INDEX_NAME,
|
||||
SLO_INGEST_PIPELINE_NAME,
|
||||
|
@ -45,7 +45,7 @@ export class MetricCustomTransformGenerator extends TransformGenerator {
|
|||
private buildSource(slo: SLO, indicator: MetricCustomIndicator) {
|
||||
const filter = getElastichsearchQueryOrThrow(indicator.params.filter);
|
||||
return {
|
||||
index: indicator.params.index,
|
||||
index: parseIndex(indicator.params.index),
|
||||
runtime_mappings: this.buildCommonRuntimeMappings(slo),
|
||||
query: filter,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue