Skip to content

Commit

Permalink
Merge pull request #392 from skh/base-index-templates-v2-2
Browse files Browse the repository at this point in the history
Use index templates v2 in package 'base'
  • Loading branch information
skh committed Apr 28, 2020
2 parents 985c918 + e647d44 commit cf47967
Show file tree
Hide file tree
Showing 17 changed files with 537 additions and 516 deletions.
2 changes: 2 additions & 0 deletions ASSETS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* By default /search?package= now only returns the most recent package. [#301](https://github.com/elastic/integrations-registry/pull/301)
* Stream configuration filenames have `.hbs` suffix appended [#308](https://github.com/elastic/package-registry/pull/380)
* Align package storage directories with public dir structure [#376](https://github.com/elastic/package-registry/pull/376)
* Use index template v2 format for pre-built and generated index templates. [#392](https://github.com/elastic/package-registry/pull/392)

### Bugfixes

Expand Down
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
Loading

0 comments on commit cf47967

Please sign in to comment.