-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Composable Templates to support Elasticsearch 8.0 #980
Merged
kaisecheng
merged 10 commits into
logstash-plugins:master
from
kaisecheng:composable_index_template
Nov 24, 2020
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c371928
compatibility with v8
kaisecheng 79742c6
fix existing test cases
kaisecheng 19cb48e
add v8 index template
kaisecheng 80d6c6b
add test cases
kaisecheng 0fdc994
fix test cases
kaisecheng 7ee9927
fix test cases
kaisecheng b7c9393
fix test cases
kaisecheng a1df78e
Merge branch 'master' of github.com:logstash-plugins/logstash-output-…
kaisecheng ff63a38
bump version
kaisecheng b4136b6
clean code
kaisecheng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: maybe for consistency we could also have a
get_mapping
method similar toget_template
?