-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Composable Templates to support Elasticsearch 8.0 (#980)
Elasticsearch's /_template API is being deprecated in 7.8 Use the new endpoint /_index_template to manage template if elasticsearch version >= 8 Add a new template 8x with priority set for default usage Fixed: #944
- Loading branch information
1 parent
5470c13
commit 853871b
Showing
11 changed files
with
227 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 39 additions & 33 deletions
72
lib/logstash/outputs/elasticsearch/templates/ecs-disabled/elasticsearch-8x.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,50 @@ | ||
{ | ||
"index_patterns" : "logstash-*", | ||
"version" : 80001, | ||
"settings" : { | ||
"index.refresh_interval" : "5s", | ||
"number_of_shards": 1 | ||
}, | ||
"mappings" : { | ||
"dynamic_templates" : [ { | ||
"message_field" : { | ||
"path_match" : "message", | ||
"match_mapping_type" : "string", | ||
"mapping" : { | ||
"type" : "text", | ||
"norms" : false | ||
"template" : { | ||
"settings" : { | ||
"index.refresh_interval" : "5s", | ||
"number_of_shards": 1 | ||
}, | ||
"mappings" : { | ||
"dynamic_templates" : [ { | ||
"message_field" : { | ||
"path_match" : "message", | ||
"match_mapping_type" : "string", | ||
"mapping" : { | ||
"type" : "text", | ||
"norms" : false | ||
} | ||
} | ||
} | ||
}, { | ||
"string_fields" : { | ||
"match" : "*", | ||
"match_mapping_type" : "string", | ||
"mapping" : { | ||
"type" : "text", "norms" : false, | ||
"fields" : { | ||
"keyword" : { "type": "keyword", "ignore_above": 256 } | ||
}, { | ||
"string_fields" : { | ||
"match" : "*", | ||
"match_mapping_type" : "string", | ||
"mapping" : { | ||
"type" : "text", "norms" : false, | ||
"fields" : { | ||
"keyword" : { "type": "keyword", "ignore_above": 256 } | ||
} | ||
} | ||
} | ||
} | ||
} ], | ||
"properties" : { | ||
"@timestamp": { "type": "date"}, | ||
"@version": { "type": "keyword"}, | ||
"geoip" : { | ||
"dynamic": true, | ||
"properties" : { | ||
"ip": { "type": "ip" }, | ||
"location" : { "type" : "geo_point" }, | ||
"latitude" : { "type" : "half_float" }, | ||
"longitude" : { "type" : "half_float" } | ||
} ], | ||
"properties" : { | ||
"@timestamp": { "type": "date" }, | ||
"@version": { "type": "keyword" }, | ||
"geoip" : { | ||
"dynamic": true, | ||
"properties" : { | ||
"ip": { "type": "ip" }, | ||
"location" : { "type" : "geo_point" }, | ||
"latitude" : { "type" : "half_float" }, | ||
"longitude" : { "type" : "half_float" } | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"priority": 200, | ||
"_meta" : { | ||
"description": "index template for logstash-output-elasticsearch" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"index_patterns" : "overwrite-*", | ||
"version" : 80001, | ||
"template" : { | ||
"settings" : { | ||
"index.refresh_interval" : "1s", | ||
"number_of_shards": 1 | ||
}, | ||
"mappings" : { | ||
"dynamic_templates" : [ { | ||
"message_field" : { | ||
"path_match" : "message", | ||
"match_mapping_type" : "string", | ||
"mapping" : { | ||
"type" : "text", | ||
"norms" : false | ||
} | ||
} | ||
}, { | ||
"string_fields" : { | ||
"match" : "*", | ||
"match_mapping_type" : "string", | ||
"mapping" : { | ||
"type" : "text", "norms" : false, | ||
"fields" : { | ||
"keyword" : { "type": "keyword", "ignore_above": 256 } | ||
} | ||
} | ||
} | ||
} ], | ||
"properties" : { | ||
"@timestamp": { "type": "date" }, | ||
"@version": { "type": "keyword" }, | ||
"geoip" : { | ||
"dynamic": true, | ||
"properties" : { | ||
"ip": { "type": "ip" }, | ||
"location" : { "type" : "geo_point" }, | ||
"latitude" : { "type" : "half_float" }, | ||
"longitude" : { "type" : "half_float" } | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"priority": 200, | ||
"_meta" : { | ||
"description": "index template for logstash-output-elasticsearch" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.