Last active
April 26, 2024 12:11
-
-
Save Zawadidone/dd6e88490796d2ed11e5e0b0536246ef to your computer and use it in GitHub Desktop.
Timesketch index mapping https://registry.terraform.io/providers/elastic/elasticstack/latest/docs/resources/elasticsearch_index
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
mappings = jsonencode({ | |
properties = { | |
__ts_timeline_id = { type = "long" } | |
datetime = { type = "date" } | |
timestamp_desc = { type = "text", fields = { keyword = { type = "keyword" } } } | |
data_type = { type = "text", fields = { keyword = { type = "keyword" } } } | |
timesketch_label = { | |
type = "nested" | |
properties = { | |
name = { | |
type = "text", | |
fields = { keyword = { type = "keyword", "ignore_above" : 256 } } | |
}, | |
sketch_id = { type = "long" }, | |
user_id = { type = "long" }, | |
} | |
} | |
} | |
# Other fields are dynamically mapped to text, this could also be mapped dynamically based on the value of the field. | |
# This is not a preffered method, but it allows a single fields to be used by all different value types | |
dynamic_templates = [ | |
{ | |
text = { | |
match_mapping_type = "*" | |
mapping = { | |
type = "text", | |
fields = { keyword = { type = "keyword", "ignore_above" = 256 } } | |
} | |
} | |
} | |
] | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://github.com/huntandhackett/ir-automation/blob/main/timesketch-ec-index-template.tf for the updated version