From ed579925ecb43ada4dd88483b6a54bbbcbd8704b Mon Sep 17 00:00:00 2001 From: Sonja Krause-Harder Date: Thu, 23 Apr 2020 13:43:33 +0200 Subject: [PATCH 1/3] Use index templates v2 in package 'base' --- .../component-template/events-mappings.json | 148 +++++++++++++++++ .../component-template/events-settings.json | 21 +++ .../component-template/logs-mappings.json | 148 +++++++++++++++++ .../component-template/logs-settings.json | 21 +++ .../component-template/metrics-mappings.json | 145 +++++++++++++++++ .../component-template/metrics-settings.json | 21 +++ .../index-template/events-mappings.json | 150 ------------------ .../index-template/events-settings.json | 23 --- .../elasticsearch/index-template/events.json | 10 ++ .../index-template/logs-mappings.json | 150 ------------------ .../index-template/logs-settings.json | 23 --- .../elasticsearch/index-template/logs.json | 10 ++ .../index-template/metrics-mappings.json | 147 ----------------- .../index-template/metrics-settings.json | 23 --- .../elasticsearch/index-template/metrics.json | 10 ++ 15 files changed, 534 insertions(+), 516 deletions(-) create mode 100644 dev/packages/example/base-1.0.0/elasticsearch/component-template/events-mappings.json create mode 100644 dev/packages/example/base-1.0.0/elasticsearch/component-template/events-settings.json create mode 100644 dev/packages/example/base-1.0.0/elasticsearch/component-template/logs-mappings.json create mode 100644 dev/packages/example/base-1.0.0/elasticsearch/component-template/logs-settings.json create mode 100644 dev/packages/example/base-1.0.0/elasticsearch/component-template/metrics-mappings.json create mode 100644 dev/packages/example/base-1.0.0/elasticsearch/component-template/metrics-settings.json delete mode 100644 dev/packages/example/base-1.0.0/elasticsearch/index-template/events-mappings.json delete mode 100644 dev/packages/example/base-1.0.0/elasticsearch/index-template/events-settings.json create mode 100644 dev/packages/example/base-1.0.0/elasticsearch/index-template/events.json delete mode 100644 dev/packages/example/base-1.0.0/elasticsearch/index-template/logs-mappings.json delete mode 100644 dev/packages/example/base-1.0.0/elasticsearch/index-template/logs-settings.json create mode 100644 dev/packages/example/base-1.0.0/elasticsearch/index-template/logs.json delete mode 100644 dev/packages/example/base-1.0.0/elasticsearch/index-template/metrics-mappings.json delete mode 100644 dev/packages/example/base-1.0.0/elasticsearch/index-template/metrics-settings.json create mode 100644 dev/packages/example/base-1.0.0/elasticsearch/index-template/metrics.json diff --git a/dev/packages/example/base-1.0.0/elasticsearch/component-template/events-mappings.json b/dev/packages/example/base-1.0.0/elasticsearch/component-template/events-mappings.json new file mode 100644 index 000000000..35488413a --- /dev/null +++ b/dev/packages/example/base-1.0.0/elasticsearch/component-template/events-mappings.json @@ -0,0 +1,148 @@ +{ + "template": { + "mappings": { + "_meta": { + }, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "date_detection": false, + "properties": { + "@timestamp": { + "type": "date" + }, + "stream": { + "properties": { + "type": { + "type": "constant_keyword" + }, + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + } + } + }, + "agent": { + "properties": { + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "build": { + "ignore_above": 1024, + "type": "keyword" + }, + "kernel": { + "ignore_above": 1024, + "type": "keyword" + }, + "codename": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "family": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "full": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ip": { + "type": "ip" + }, + "containerized": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "mac": { + "ignore_above": 1024, + "type": "keyword" + }, + "architecture": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "message": { + "type": "text" + } + } + }, + "aliases": {} + } +} diff --git a/dev/packages/example/base-1.0.0/elasticsearch/component-template/events-settings.json b/dev/packages/example/base-1.0.0/elasticsearch/component-template/events-settings.json new file mode 100644 index 000000000..3cd594414 --- /dev/null +++ b/dev/packages/example/base-1.0.0/elasticsearch/component-template/events-settings.json @@ -0,0 +1,21 @@ +{ + "template": { + "settings": { + "index": { + "lifecycle": { + "name": "events-default" + }, + "codec": "best_compression", + "refresh_interval": "5s", + "number_of_shards": "1", + "query": { + "default_field": [ + "message" + ] + }, + "number_of_routing_shards": "30" + } + }, + "aliases": {} + } +} diff --git a/dev/packages/example/base-1.0.0/elasticsearch/component-template/logs-mappings.json b/dev/packages/example/base-1.0.0/elasticsearch/component-template/logs-mappings.json new file mode 100644 index 000000000..35488413a --- /dev/null +++ b/dev/packages/example/base-1.0.0/elasticsearch/component-template/logs-mappings.json @@ -0,0 +1,148 @@ +{ + "template": { + "mappings": { + "_meta": { + }, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "date_detection": false, + "properties": { + "@timestamp": { + "type": "date" + }, + "stream": { + "properties": { + "type": { + "type": "constant_keyword" + }, + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + } + } + }, + "agent": { + "properties": { + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "build": { + "ignore_above": 1024, + "type": "keyword" + }, + "kernel": { + "ignore_above": 1024, + "type": "keyword" + }, + "codename": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "family": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "full": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ip": { + "type": "ip" + }, + "containerized": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "mac": { + "ignore_above": 1024, + "type": "keyword" + }, + "architecture": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "message": { + "type": "text" + } + } + }, + "aliases": {} + } +} diff --git a/dev/packages/example/base-1.0.0/elasticsearch/component-template/logs-settings.json b/dev/packages/example/base-1.0.0/elasticsearch/component-template/logs-settings.json new file mode 100644 index 000000000..eaaa60a9a --- /dev/null +++ b/dev/packages/example/base-1.0.0/elasticsearch/component-template/logs-settings.json @@ -0,0 +1,21 @@ +{ + "template": { + "settings": { + "index": { + "lifecycle": { + "name": "logs-default" + }, + "codec": "best_compression", + "refresh_interval": "5s", + "number_of_shards": "1", + "query": { + "default_field": [ + "message" + ] + }, + "number_of_routing_shards": "30" + } + }, + "aliases": {} + } +} diff --git a/dev/packages/example/base-1.0.0/elasticsearch/component-template/metrics-mappings.json b/dev/packages/example/base-1.0.0/elasticsearch/component-template/metrics-mappings.json new file mode 100644 index 000000000..29f7d8bd1 --- /dev/null +++ b/dev/packages/example/base-1.0.0/elasticsearch/component-template/metrics-mappings.json @@ -0,0 +1,145 @@ +{ + "template": { + "mappings": { + "_meta": { + }, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "date_detection": false, + "properties": { + "@timestamp": { + "type": "date" + }, + "stream": { + "properties": { + "type": { + "type": "constant_keyword" + }, + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + } + } + }, + "agent": { + "properties": { + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "build": { + "ignore_above": 1024, + "type": "keyword" + }, + "kernel": { + "ignore_above": 1024, + "type": "keyword" + }, + "codename": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "family": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "full": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ip": { + "type": "ip" + }, + "containerized": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "mac": { + "ignore_above": 1024, + "type": "keyword" + }, + "architecture": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "aliases": {} + } +} diff --git a/dev/packages/example/base-1.0.0/elasticsearch/component-template/metrics-settings.json b/dev/packages/example/base-1.0.0/elasticsearch/component-template/metrics-settings.json new file mode 100644 index 000000000..539f79ed9 --- /dev/null +++ b/dev/packages/example/base-1.0.0/elasticsearch/component-template/metrics-settings.json @@ -0,0 +1,21 @@ +{ + "template": { + "settings": { + "index": { + "lifecycle": { + "name": "metrics-default" + }, + "codec": "best_compression", + "refresh_interval": "5s", + "number_of_shards": "1", + "query": { + "default_field": [ + "message" + ] + }, + "number_of_routing_shards": "30" + } + }, + "aliases": {} + } +} diff --git a/dev/packages/example/base-1.0.0/elasticsearch/index-template/events-mappings.json b/dev/packages/example/base-1.0.0/elasticsearch/index-template/events-mappings.json deleted file mode 100644 index 91fe3358e..000000000 --- a/dev/packages/example/base-1.0.0/elasticsearch/index-template/events-mappings.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "order": 1, - "index_patterns": [ - "events-*-*" - ], - "mappings": { - "_meta": { - }, - "dynamic_templates": [ - { - "strings_as_keyword": { - "mapping": { - "ignore_above": 1024, - "type": "keyword" - }, - "match_mapping_type": "string" - } - } - ], - "date_detection": false, - "properties": { - "@timestamp": { - "type": "date" - }, - "stream": { - "properties": { - "type": { - "type": "constant_keyword" - }, - "dataset": { - "type": "constant_keyword" - }, - "namespace": { - "type": "constant_keyword" - } - } - }, - "agent": { - "properties": { - "hostname": { - "ignore_above": 1024, - "type": "keyword" - }, - "name": { - "ignore_above": 1024, - "type": "keyword" - }, - "id": { - "ignore_above": 1024, - "type": "keyword" - }, - "ephemeral_id": { - "ignore_above": 1024, - "type": "keyword" - }, - "type": { - "ignore_above": 1024, - "type": "keyword" - }, - "version": { - "ignore_above": 1024, - "type": "keyword" - } - } - }, - "ecs": { - "properties": { - "version": { - "ignore_above": 1024, - "type": "keyword" - } - } - }, - "host": { - "properties": { - "hostname": { - "ignore_above": 1024, - "type": "keyword" - }, - "os": { - "properties": { - "build": { - "ignore_above": 1024, - "type": "keyword" - }, - "kernel": { - "ignore_above": 1024, - "type": "keyword" - }, - "codename": { - "ignore_above": 1024, - "type": "keyword" - }, - "name": { - "ignore_above": 1024, - "type": "keyword" - }, - "family": { - "ignore_above": 1024, - "type": "keyword" - }, - "version": { - "ignore_above": 1024, - "type": "keyword" - }, - "platform": { - "ignore_above": 1024, - "type": "keyword" - }, - "full": { - "ignore_above": 1024, - "type": "keyword" - } - } - }, - "ip": { - "type": "ip" - }, - "containerized": { - "type": "boolean" - }, - "name": { - "ignore_above": 1024, - "type": "keyword" - }, - "id": { - "ignore_above": 1024, - "type": "keyword" - }, - "type": { - "ignore_above": 1024, - "type": "keyword" - }, - "mac": { - "ignore_above": 1024, - "type": "keyword" - }, - "architecture": { - "ignore_above": 1024, - "type": "keyword" - } - } - }, - "message": { - "type": "text" - } - } - }, - "aliases": {} -} diff --git a/dev/packages/example/base-1.0.0/elasticsearch/index-template/events-settings.json b/dev/packages/example/base-1.0.0/elasticsearch/index-template/events-settings.json deleted file mode 100644 index 49bc7ae4c..000000000 --- a/dev/packages/example/base-1.0.0/elasticsearch/index-template/events-settings.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "order": 1, - "index_patterns": [ - "events-*-*" - ], - "settings": { - "index": { - "lifecycle": { - "name": "events-default" - }, - "codec": "best_compression", - "refresh_interval": "5s", - "number_of_shards": "1", - "query": { - "default_field": [ - "message" - ] - }, - "number_of_routing_shards": "30" - } - }, - "aliases": {} -} diff --git a/dev/packages/example/base-1.0.0/elasticsearch/index-template/events.json b/dev/packages/example/base-1.0.0/elasticsearch/index-template/events.json new file mode 100644 index 000000000..743c2bea3 --- /dev/null +++ b/dev/packages/example/base-1.0.0/elasticsearch/index-template/events.json @@ -0,0 +1,10 @@ +{ + "index_patterns": [ + "events-*-*" + ], + "priority": 0, + "composed_of": [ + "events-mappings", + "events-settings" + ] +} \ No newline at end of file diff --git a/dev/packages/example/base-1.0.0/elasticsearch/index-template/logs-mappings.json b/dev/packages/example/base-1.0.0/elasticsearch/index-template/logs-mappings.json deleted file mode 100644 index ba71b98a2..000000000 --- a/dev/packages/example/base-1.0.0/elasticsearch/index-template/logs-mappings.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "order": 1, - "index_patterns": [ - "logs-*-*" - ], - "mappings": { - "_meta": { - }, - "dynamic_templates": [ - { - "strings_as_keyword": { - "mapping": { - "ignore_above": 1024, - "type": "keyword" - }, - "match_mapping_type": "string" - } - } - ], - "date_detection": false, - "properties": { - "@timestamp": { - "type": "date" - }, - "stream": { - "properties": { - "type": { - "type": "constant_keyword" - }, - "dataset": { - "type": "constant_keyword" - }, - "namespace": { - "type": "constant_keyword" - } - } - }, - "agent": { - "properties": { - "hostname": { - "ignore_above": 1024, - "type": "keyword" - }, - "name": { - "ignore_above": 1024, - "type": "keyword" - }, - "id": { - "ignore_above": 1024, - "type": "keyword" - }, - "ephemeral_id": { - "ignore_above": 1024, - "type": "keyword" - }, - "type": { - "ignore_above": 1024, - "type": "keyword" - }, - "version": { - "ignore_above": 1024, - "type": "keyword" - } - } - }, - "ecs": { - "properties": { - "version": { - "ignore_above": 1024, - "type": "keyword" - } - } - }, - "host": { - "properties": { - "hostname": { - "ignore_above": 1024, - "type": "keyword" - }, - "os": { - "properties": { - "build": { - "ignore_above": 1024, - "type": "keyword" - }, - "kernel": { - "ignore_above": 1024, - "type": "keyword" - }, - "codename": { - "ignore_above": 1024, - "type": "keyword" - }, - "name": { - "ignore_above": 1024, - "type": "keyword" - }, - "family": { - "ignore_above": 1024, - "type": "keyword" - }, - "version": { - "ignore_above": 1024, - "type": "keyword" - }, - "platform": { - "ignore_above": 1024, - "type": "keyword" - }, - "full": { - "ignore_above": 1024, - "type": "keyword" - } - } - }, - "ip": { - "type": "ip" - }, - "containerized": { - "type": "boolean" - }, - "name": { - "ignore_above": 1024, - "type": "keyword" - }, - "id": { - "ignore_above": 1024, - "type": "keyword" - }, - "type": { - "ignore_above": 1024, - "type": "keyword" - }, - "mac": { - "ignore_above": 1024, - "type": "keyword" - }, - "architecture": { - "ignore_above": 1024, - "type": "keyword" - } - } - }, - "message": { - "type": "text" - } - } - }, - "aliases": {} -} diff --git a/dev/packages/example/base-1.0.0/elasticsearch/index-template/logs-settings.json b/dev/packages/example/base-1.0.0/elasticsearch/index-template/logs-settings.json deleted file mode 100644 index 206e3e81c..000000000 --- a/dev/packages/example/base-1.0.0/elasticsearch/index-template/logs-settings.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "order": 1, - "index_patterns": [ - "logs-*-*" - ], - "settings": { - "index": { - "lifecycle": { - "name": "logs-default" - }, - "codec": "best_compression", - "refresh_interval": "5s", - "number_of_shards": "1", - "query": { - "default_field": [ - "message" - ] - }, - "number_of_routing_shards": "30" - } - }, - "aliases": {} -} diff --git a/dev/packages/example/base-1.0.0/elasticsearch/index-template/logs.json b/dev/packages/example/base-1.0.0/elasticsearch/index-template/logs.json new file mode 100644 index 000000000..abec4fe3e --- /dev/null +++ b/dev/packages/example/base-1.0.0/elasticsearch/index-template/logs.json @@ -0,0 +1,10 @@ +{ + "index_patterns": [ + "logs-*-*" + ], + "priority": 0, + "composed_of": [ + "logs-mappings", + "logs-settings" + ] +} \ No newline at end of file diff --git a/dev/packages/example/base-1.0.0/elasticsearch/index-template/metrics-mappings.json b/dev/packages/example/base-1.0.0/elasticsearch/index-template/metrics-mappings.json deleted file mode 100644 index 2d84a1e18..000000000 --- a/dev/packages/example/base-1.0.0/elasticsearch/index-template/metrics-mappings.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "order": 1, - "index_patterns": [ - "metrics-*-*" - ], - "mappings": { - "_meta": { - }, - "dynamic_templates": [ - { - "strings_as_keyword": { - "mapping": { - "ignore_above": 1024, - "type": "keyword" - }, - "match_mapping_type": "string" - } - } - ], - "date_detection": false, - "properties": { - "@timestamp": { - "type": "date" - }, - "stream": { - "properties": { - "type": { - "type": "constant_keyword" - }, - "dataset": { - "type": "constant_keyword" - }, - "namespace": { - "type": "constant_keyword" - } - } - }, - "agent": { - "properties": { - "hostname": { - "ignore_above": 1024, - "type": "keyword" - }, - "name": { - "ignore_above": 1024, - "type": "keyword" - }, - "id": { - "ignore_above": 1024, - "type": "keyword" - }, - "ephemeral_id": { - "ignore_above": 1024, - "type": "keyword" - }, - "type": { - "ignore_above": 1024, - "type": "keyword" - }, - "version": { - "ignore_above": 1024, - "type": "keyword" - } - } - }, - "ecs": { - "properties": { - "version": { - "ignore_above": 1024, - "type": "keyword" - } - } - }, - "host": { - "properties": { - "hostname": { - "ignore_above": 1024, - "type": "keyword" - }, - "os": { - "properties": { - "build": { - "ignore_above": 1024, - "type": "keyword" - }, - "kernel": { - "ignore_above": 1024, - "type": "keyword" - }, - "codename": { - "ignore_above": 1024, - "type": "keyword" - }, - "name": { - "ignore_above": 1024, - "type": "keyword" - }, - "family": { - "ignore_above": 1024, - "type": "keyword" - }, - "version": { - "ignore_above": 1024, - "type": "keyword" - }, - "platform": { - "ignore_above": 1024, - "type": "keyword" - }, - "full": { - "ignore_above": 1024, - "type": "keyword" - } - } - }, - "ip": { - "type": "ip" - }, - "containerized": { - "type": "boolean" - }, - "name": { - "ignore_above": 1024, - "type": "keyword" - }, - "id": { - "ignore_above": 1024, - "type": "keyword" - }, - "type": { - "ignore_above": 1024, - "type": "keyword" - }, - "mac": { - "ignore_above": 1024, - "type": "keyword" - }, - "architecture": { - "ignore_above": 1024, - "type": "keyword" - } - } - } - } - }, - "aliases": {} -} diff --git a/dev/packages/example/base-1.0.0/elasticsearch/index-template/metrics-settings.json b/dev/packages/example/base-1.0.0/elasticsearch/index-template/metrics-settings.json deleted file mode 100644 index 27af22922..000000000 --- a/dev/packages/example/base-1.0.0/elasticsearch/index-template/metrics-settings.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "order": 1, - "index_patterns": [ - "metrics-*-*" - ], - "settings": { - "index": { - "lifecycle": { - "name": "metrics-default" - }, - "codec": "best_compression", - "refresh_interval": "5s", - "number_of_shards": "1", - "query": { - "default_field": [ - "message" - ] - }, - "number_of_routing_shards": "30" - } - }, - "aliases": {} -} diff --git a/dev/packages/example/base-1.0.0/elasticsearch/index-template/metrics.json b/dev/packages/example/base-1.0.0/elasticsearch/index-template/metrics.json new file mode 100644 index 000000000..22711318f --- /dev/null +++ b/dev/packages/example/base-1.0.0/elasticsearch/index-template/metrics.json @@ -0,0 +1,10 @@ +{ + "index_patterns": [ + "metrics-*-*" + ], + "priority": 0, + "composed_of": [ + "metrics-mappings", + "metrics-settings" + ] +} \ No newline at end of file From f152afc51fa13bdf98f11a06559833e96e58e7cf Mon Sep 17 00:00:00 2001 From: Sonja Krause-Harder Date: Mon, 27 Apr 2020 16:59:57 +0200 Subject: [PATCH 2/3] Document mandatory use of index templates v2. --- ASSETS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ASSETS.md b/ASSETS.md index abc8c1774..09638b1ed 100644 --- a/ASSETS.md +++ b/ASSETS.md @@ -134,6 +134,8 @@ and index patterns out of all the combined fields.yml. An Index Template also relates to the ILM policy as it can reference to which ILM policy should be applied to the indices created. +Prebuilt Index Templates contained in packages have to follow the [Index Templates v2 specification](https://github.com/elastic/elasticsearch/issues/53101). Index Templates generated by EPM also follow this specification. + ### ILM Policy * Asset Path: `elasticsearch/ilm-policy/*.json` From 6fcb6e12b5bb91634b318aad82c2e769feb40d11 Mon Sep 17 00:00:00 2001 From: Sonja Krause-Harder Date: Mon, 27 Apr 2020 17:47:22 +0200 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 368ea73c1..72771c68b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Change package path from /package/{packagename}-{version} to /package/{packagename}/{version} [#300](https://github.com/elastic/integrations-registry/pull/300) * By default /search?package= now only returns the most recent package. [#301](https://github.com/elastic/integrations-registry/pull/301) +* Use index template v2 format for pre-built and generated index templates. [#378](https://github.com/elastic/package-registry/pull/378) ### Bugfixes