Fix #34: use fields.yml for export template so properties and @timest…#40
Open
deepujain wants to merge 1 commit intoeBay:masterfrom
Open
Fix #34: use fields.yml for export template so properties and @timest…#40deepujain wants to merge 1 commit intoeBay:masterfrom
deepujain wants to merge 1 commit intoeBay:masterfrom
Conversation
…mestamp are correct - Expand _meta/fields.yml with @timestamp (date), beat, type for template generation - Add setup.template.fields in nvidiagpubeat.yml so export template uses it - README: add Export index template section (fixes eBay#34, eBay#15)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary of fix
Fixes #34. The export template output previously had empty "properties": {}, which led to @timestamp being mapped as a string 1. This change wires the beat to the repo’s fields definition so the exported template has the right mappings.
Changes made
Verification
Run from repo root:
`
./nvidiagpubeat -c nvidiagpubeat.yml export template
{
"index_patterns": [
"nvidiagpubeat-6.5.5-*"
],
"mappings": {
"doc": {
"_meta": {
"version": "6.5.5"
},
"date_detection": false,
"dynamic_templates": [
{
"strings_as_keyword": {
"mapping": {
"ignore_above": 1024,
"type": "keyword"
},
"match_mapping_type": "string"
}
}
],
"properties": {
"@timestamp": {
"type": "date"
},
"beat": {
"properties": {
"hostname": {
"ignore_above": 1024,
"type": "keyword"
},
"name": {
"ignore_above": 1024,
"type": "keyword"
},
"version": {
"ignore_above": 1024,
"type": "keyword"
}
}
},
"counter": {
"type": "long"
},
"type": {
"ignore_above": 1024,
"type": "keyword"
}
}
}
},
"order": 1,
"settings": {
"index": {
"mapping": {
"total_fields": {
"limit": 10000
}
},
"number_of_routing_shards": 30,
"refresh_interval": "5s"
}
}
}
`
The JSON now has non-empty mappings.doc.properties with @timestamp as date, plus beat, counter, type.
Request to eBay maintainer
Please review and merge this PR when convenient. Thank you.