mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
feat(slo): remove internal data (#150573)
This commit is contained in:
parent
fdc1a781dd
commit
820500f3d9
5 changed files with 1 additions and 403 deletions
|
@ -35,23 +35,6 @@ export const getSLOMappingsTemplate = (name: string) => ({
|
|||
context: {
|
||||
type: 'flattened',
|
||||
},
|
||||
_internal: {
|
||||
properties: {
|
||||
name: { type: 'keyword', ignore_above: 256 },
|
||||
budgeting_method: { type: 'keyword' },
|
||||
objective: {
|
||||
properties: {
|
||||
target: { type: 'double' },
|
||||
},
|
||||
},
|
||||
time_window: {
|
||||
properties: {
|
||||
duration: { type: 'keyword' },
|
||||
is_rolling: { type: 'boolean' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -73,31 +73,6 @@ Object {
|
|||
"fixed_interval": "2m",
|
||||
},
|
||||
},
|
||||
"slo._internal.budgeting_method": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.budgeting_method",
|
||||
},
|
||||
},
|
||||
"slo._internal.name": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.name",
|
||||
},
|
||||
},
|
||||
"slo._internal.objective.target": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.objective.target",
|
||||
},
|
||||
},
|
||||
"slo._internal.time_window.duration": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.time_window.duration",
|
||||
},
|
||||
},
|
||||
"slo._internal.time_window.is_rolling": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.time_window.is_rolling",
|
||||
},
|
||||
},
|
||||
"slo.id": Object {
|
||||
"terms": Object {
|
||||
"field": "slo.id",
|
||||
|
@ -154,36 +129,6 @@ Object {
|
|||
},
|
||||
},
|
||||
"runtime_mappings": Object {
|
||||
"slo._internal.budgeting_method": Object {
|
||||
"script": Object {
|
||||
"source": "emit('timeslices')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.name": Object {
|
||||
"script": Object {
|
||||
"source": "emit('irrelevant')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.objective.target": Object {
|
||||
"script": Object {
|
||||
"source": "emit(0.98)",
|
||||
},
|
||||
"type": "double",
|
||||
},
|
||||
"slo._internal.time_window.duration": Object {
|
||||
"script": Object {
|
||||
"source": "emit('7d')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.time_window.is_rolling": Object {
|
||||
"script": Object {
|
||||
"source": "emit(true)",
|
||||
},
|
||||
"type": "boolean",
|
||||
},
|
||||
"slo.id": Object {
|
||||
"script": Object {
|
||||
"source": Any<String>,
|
||||
|
@ -251,31 +196,6 @@ Object {
|
|||
"fixed_interval": "1m",
|
||||
},
|
||||
},
|
||||
"slo._internal.budgeting_method": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.budgeting_method",
|
||||
},
|
||||
},
|
||||
"slo._internal.name": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.name",
|
||||
},
|
||||
},
|
||||
"slo._internal.objective.target": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.objective.target",
|
||||
},
|
||||
},
|
||||
"slo._internal.time_window.duration": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.time_window.duration",
|
||||
},
|
||||
},
|
||||
"slo._internal.time_window.is_rolling": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.time_window.is_rolling",
|
||||
},
|
||||
},
|
||||
"slo.id": Object {
|
||||
"terms": Object {
|
||||
"field": "slo.id",
|
||||
|
@ -332,36 +252,6 @@ Object {
|
|||
},
|
||||
},
|
||||
"runtime_mappings": Object {
|
||||
"slo._internal.budgeting_method": Object {
|
||||
"script": Object {
|
||||
"source": "emit('occurrences')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.name": Object {
|
||||
"script": Object {
|
||||
"source": "emit('irrelevant')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.objective.target": Object {
|
||||
"script": Object {
|
||||
"source": "emit(0.999)",
|
||||
},
|
||||
"type": "double",
|
||||
},
|
||||
"slo._internal.time_window.duration": Object {
|
||||
"script": Object {
|
||||
"source": "emit('7d')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.time_window.is_rolling": Object {
|
||||
"script": Object {
|
||||
"source": "emit(true)",
|
||||
},
|
||||
"type": "boolean",
|
||||
},
|
||||
"slo.id": Object {
|
||||
"script": Object {
|
||||
"source": Any<String>,
|
||||
|
|
|
@ -78,31 +78,6 @@ Object {
|
|||
"fixed_interval": "2m",
|
||||
},
|
||||
},
|
||||
"slo._internal.budgeting_method": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.budgeting_method",
|
||||
},
|
||||
},
|
||||
"slo._internal.name": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.name",
|
||||
},
|
||||
},
|
||||
"slo._internal.objective.target": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.objective.target",
|
||||
},
|
||||
},
|
||||
"slo._internal.time_window.duration": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.time_window.duration",
|
||||
},
|
||||
},
|
||||
"slo._internal.time_window.is_rolling": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.time_window.is_rolling",
|
||||
},
|
||||
},
|
||||
"slo.id": Object {
|
||||
"terms": Object {
|
||||
"field": "slo.id",
|
||||
|
@ -159,36 +134,6 @@ Object {
|
|||
},
|
||||
},
|
||||
"runtime_mappings": Object {
|
||||
"slo._internal.budgeting_method": Object {
|
||||
"script": Object {
|
||||
"source": "emit('timeslices')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.name": Object {
|
||||
"script": Object {
|
||||
"source": "emit('irrelevant')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.objective.target": Object {
|
||||
"script": Object {
|
||||
"source": "emit(0.98)",
|
||||
},
|
||||
"type": "double",
|
||||
},
|
||||
"slo._internal.time_window.duration": Object {
|
||||
"script": Object {
|
||||
"source": "emit('7d')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.time_window.is_rolling": Object {
|
||||
"script": Object {
|
||||
"source": "emit(true)",
|
||||
},
|
||||
"type": "boolean",
|
||||
},
|
||||
"slo.id": Object {
|
||||
"script": Object {
|
||||
"source": Any<String>,
|
||||
|
@ -261,31 +206,6 @@ Object {
|
|||
"fixed_interval": "1m",
|
||||
},
|
||||
},
|
||||
"slo._internal.budgeting_method": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.budgeting_method",
|
||||
},
|
||||
},
|
||||
"slo._internal.name": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.name",
|
||||
},
|
||||
},
|
||||
"slo._internal.objective.target": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.objective.target",
|
||||
},
|
||||
},
|
||||
"slo._internal.time_window.duration": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.time_window.duration",
|
||||
},
|
||||
},
|
||||
"slo._internal.time_window.is_rolling": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.time_window.is_rolling",
|
||||
},
|
||||
},
|
||||
"slo.id": Object {
|
||||
"terms": Object {
|
||||
"field": "slo.id",
|
||||
|
@ -342,36 +262,6 @@ Object {
|
|||
},
|
||||
},
|
||||
"runtime_mappings": Object {
|
||||
"slo._internal.budgeting_method": Object {
|
||||
"script": Object {
|
||||
"source": "emit('occurrences')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.name": Object {
|
||||
"script": Object {
|
||||
"source": "emit('irrelevant')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.objective.target": Object {
|
||||
"script": Object {
|
||||
"source": "emit(0.999)",
|
||||
},
|
||||
"type": "double",
|
||||
},
|
||||
"slo._internal.time_window.duration": Object {
|
||||
"script": Object {
|
||||
"source": "emit('7d')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.time_window.is_rolling": Object {
|
||||
"script": Object {
|
||||
"source": "emit(true)",
|
||||
},
|
||||
"type": "boolean",
|
||||
},
|
||||
"slo.id": Object {
|
||||
"script": Object {
|
||||
"source": Any<String>,
|
||||
|
|
|
@ -150,31 +150,6 @@ Object {
|
|||
"fixed_interval": "2m",
|
||||
},
|
||||
},
|
||||
"slo._internal.budgeting_method": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.budgeting_method",
|
||||
},
|
||||
},
|
||||
"slo._internal.name": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.name",
|
||||
},
|
||||
},
|
||||
"slo._internal.objective.target": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.objective.target",
|
||||
},
|
||||
},
|
||||
"slo._internal.time_window.duration": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.time_window.duration",
|
||||
},
|
||||
},
|
||||
"slo._internal.time_window.is_rolling": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.time_window.is_rolling",
|
||||
},
|
||||
},
|
||||
"slo.id": Object {
|
||||
"terms": Object {
|
||||
"field": "slo.id",
|
||||
|
@ -205,36 +180,6 @@ Object {
|
|||
},
|
||||
},
|
||||
"runtime_mappings": Object {
|
||||
"slo._internal.budgeting_method": Object {
|
||||
"script": Object {
|
||||
"source": "emit('timeslices')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.name": Object {
|
||||
"script": Object {
|
||||
"source": "emit('irrelevant')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.objective.target": Object {
|
||||
"script": Object {
|
||||
"source": "emit(0.98)",
|
||||
},
|
||||
"type": "double",
|
||||
},
|
||||
"slo._internal.time_window.duration": Object {
|
||||
"script": Object {
|
||||
"source": "emit('7d')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.time_window.is_rolling": Object {
|
||||
"script": Object {
|
||||
"source": "emit(true)",
|
||||
},
|
||||
"type": "boolean",
|
||||
},
|
||||
"slo.id": Object {
|
||||
"script": Object {
|
||||
"source": Any<String>,
|
||||
|
@ -300,31 +245,6 @@ Object {
|
|||
"fixed_interval": "1m",
|
||||
},
|
||||
},
|
||||
"slo._internal.budgeting_method": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.budgeting_method",
|
||||
},
|
||||
},
|
||||
"slo._internal.name": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.name",
|
||||
},
|
||||
},
|
||||
"slo._internal.objective.target": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.objective.target",
|
||||
},
|
||||
},
|
||||
"slo._internal.time_window.duration": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.time_window.duration",
|
||||
},
|
||||
},
|
||||
"slo._internal.time_window.is_rolling": Object {
|
||||
"terms": Object {
|
||||
"field": "slo._internal.time_window.is_rolling",
|
||||
},
|
||||
},
|
||||
"slo.id": Object {
|
||||
"terms": Object {
|
||||
"field": "slo.id",
|
||||
|
@ -355,36 +275,6 @@ Object {
|
|||
},
|
||||
},
|
||||
"runtime_mappings": Object {
|
||||
"slo._internal.budgeting_method": Object {
|
||||
"script": Object {
|
||||
"source": "emit('occurrences')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.name": Object {
|
||||
"script": Object {
|
||||
"source": "emit('irrelevant')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.objective.target": Object {
|
||||
"script": Object {
|
||||
"source": "emit(0.999)",
|
||||
},
|
||||
"type": "double",
|
||||
},
|
||||
"slo._internal.time_window.duration": Object {
|
||||
"script": Object {
|
||||
"source": "emit('7d')",
|
||||
},
|
||||
"type": "keyword",
|
||||
},
|
||||
"slo._internal.time_window.is_rolling": Object {
|
||||
"script": Object {
|
||||
"source": "emit(true)",
|
||||
},
|
||||
"type": "boolean",
|
||||
},
|
||||
"slo.id": Object {
|
||||
"script": Object {
|
||||
"source": Any<String>,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { MappingRuntimeFieldType } from '@elastic/elasticsearch/lib/api/types';
|
||||
import { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { calendarAlignedTimeWindowSchema, timeslicesBudgetingMethodSchema } from '@kbn/slo-schema';
|
||||
import { timeslicesBudgetingMethodSchema } from '@kbn/slo-schema';
|
||||
|
||||
import { TransformSettings } from '../../../assets/transform_templates/slo_transform_template';
|
||||
import { SLO } from '../../../domain/models';
|
||||
|
@ -29,36 +29,6 @@ export abstract class TransformGenerator {
|
|||
source: `emit(${slo.revision})`,
|
||||
},
|
||||
},
|
||||
'slo._internal.name': {
|
||||
type: 'keyword' as MappingRuntimeFieldType,
|
||||
script: {
|
||||
source: `emit('${slo.name}')`,
|
||||
},
|
||||
},
|
||||
'slo._internal.budgeting_method': {
|
||||
type: 'keyword' as MappingRuntimeFieldType,
|
||||
script: {
|
||||
source: `emit('${slo.budgetingMethod}')`,
|
||||
},
|
||||
},
|
||||
'slo._internal.objective.target': {
|
||||
type: 'double' as MappingRuntimeFieldType,
|
||||
script: {
|
||||
source: `emit(${slo.objective.target})`,
|
||||
},
|
||||
},
|
||||
'slo._internal.time_window.duration': {
|
||||
type: 'keyword' as MappingRuntimeFieldType,
|
||||
script: {
|
||||
source: `emit('${slo.timeWindow.duration.format()}')`,
|
||||
},
|
||||
},
|
||||
'slo._internal.time_window.is_rolling': {
|
||||
type: 'boolean' as MappingRuntimeFieldType,
|
||||
script: {
|
||||
source: calendarAlignedTimeWindowSchema.is(slo.timeWindow) ? `emit(false)` : `emit(true)`,
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -79,31 +49,6 @@ export abstract class TransformGenerator {
|
|||
field: 'slo.revision',
|
||||
},
|
||||
},
|
||||
'slo._internal.name': {
|
||||
terms: {
|
||||
field: 'slo._internal.name',
|
||||
},
|
||||
},
|
||||
'slo._internal.budgeting_method': {
|
||||
terms: {
|
||||
field: 'slo._internal.budgeting_method',
|
||||
},
|
||||
},
|
||||
'slo._internal.objective.target': {
|
||||
terms: {
|
||||
field: 'slo._internal.objective.target',
|
||||
},
|
||||
},
|
||||
'slo._internal.time_window.duration': {
|
||||
terms: {
|
||||
field: 'slo._internal.time_window.duration',
|
||||
},
|
||||
},
|
||||
'slo._internal.time_window.is_rolling': {
|
||||
terms: {
|
||||
field: 'slo._internal.time_window.is_rolling',
|
||||
},
|
||||
},
|
||||
// Field used in the destination index, using @timestamp as per mapping definition
|
||||
'@timestamp': {
|
||||
date_histogram: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue