I think so. Here’s what I tried today:
But there’s no rollover after 2h.
Preview of the “logs” template
{
"template": {
"settings": {
"index": {
"lifecycle": {
"name": "logs",
"prefer_ilm": "false"
},
"codec": "best_compression",
"routing": {
"allocation": {
"include": {
"_tier_preference": "data_hot"
}
}
},
"default_pipeline": "logs@default-pipeline",
"mapping": {
"total_fields": {
"ignore_dynamic_beyond_limit": "true"
},
"ignore_malformed": "true"
},
"number_of_replicas": "0"
}
},
"mappings": {
"_data_stream_timestamp": {
"enabled": true
},
"dynamic_templates": [
{
"ecs_timestamp": {
"match": "@timestamp",
"mapping": {
"ignore_malformed": false,
"type": "date"
}
}
},
{
"ecs_message_match_only_text": {
"path_match": [
"message",
"*.message"
],
"unmatch_mapping_type": "object",
"mapping": {
"type": "match_only_text"
}
}
},
{
"ecs_non_indexed_keyword": {
"path_match": [
"*event.original",
"*gen_ai.agent.description"
],
"mapping": {
"doc_values": false,
"index": false,
"type": "keyword"
}
}
},
{
"ecs_non_indexed_long": {
"path_match": "*.x509.public_key_exponent",
"mapping": {
"doc_values": false,
"index": false,
"type": "long"
}
}
},
{
"ecs_ip": {
"path_match": [
"ip",
"*.ip",
"*_ip"
],
"match_mapping_type": "string",
"mapping": {
"type": "ip"
}
}
},
{
"ecs_wildcard": {
"path_match": [
"*.io.text",
"*.message_id",
"*registry.data.strings",
"*url.path"
],
"unmatch_mapping_type": "object",
"mapping": {
"type": "wildcard"
}
}
},
{
"ecs_path_match_wildcard_and_match_only_text": {
"path_match": [
"*.body.content",
"*url.full",
"*url.original"
],
"unmatch_mapping_type": "object",
"mapping": {
"fields": {
"text": {
"type": "match_only_text"
}
},
"type": "wildcard"
}
}
},
{
"ecs_match_wildcard_and_match_only_text": {
"match": [
"*command_line",
"*stack_trace"
],
"unmatch_mapping_type": "object",
"mapping": {
"fields": {
"text": {
"type": "match_only_text"
}
},
"type": "wildcard"
}
}
},
{
"ecs_path_match_keyword_and_match_only_text": {
"path_match": [
"*.title",
"*.executable",
"*.name",
"*.working_directory",
"*.full_name",
"*file.path",
"*file.target_path",
"*os.full",
"*email.subject",
"*vulnerability.description",
"*user_agent.original"
],
"unmatch_mapping_type": "object",
"mapping": {
"fields": {
"text": {
"type": "match_only_text"
}
},
"type": "keyword"
}
}
},
{
"ecs_date": {
"path_match": [
"*.timestamp",
"*_timestamp",
"*.not_after",
"*.not_before",
"*.accessed",
"created",
"*.created",
"*.installed",
"*.creation_date",
"*.ctime",
"*.mtime",
"ingested",
"*.ingested",
"*.start",
"*.end",
"*.indicator.first_seen",
"*.indicator.last_seen",
"*.indicator.modified_at",
"*threat.enrichments.matched.occurred"
],
"unmatch_mapping_type": "object",
"mapping": {
"type": "date"
}
}
},
{
"ecs_path_match_float": {
"path_match": [
"*.score.*",
"*_score*"
],
"path_unmatch": "*.version",
"unmatch_mapping_type": "object",
"mapping": {
"type": "float"
}
}
},
{
"ecs_usage_double_scaled_float": {
"path_match": "*.usage",
"match_mapping_type": [
"double",
"long",
"string"
],
"mapping": {
"scaling_factor": 1000,
"type": "scaled_float"
}
}
},
{
"ecs_geo_point": {
"path_match": "*.geo.location",
"mapping": {
"type": "geo_point"
}
}
},
{
"ecs_flattened": {
"path_match": [
"*structured_data",
"*exports",
"*imports"
],
"match_mapping_type": "object",
"mapping": {
"type": "flattened"
}
}
},
{
"ecs_gen_ai_integers": {
"path_match": [
"*gen_ai.request.max_tokens",
"*gen_ai.usage.input_tokens",
"*gen_ai.usage.output_tokens",
"*gen_ai.request.choice.count",
"*gen_ai.request.seed"
],
"mapping": {
"type": "integer"
}
}
},
{
"ecs_gen_ai_doubles": {
"path_match": [
"*gen_ai.request.temperature",
"*gen_ai.request.top_k",
"*gen_ai.request.frequency_penalty",
"*gen_ai.request.presence_penalty",
"*gen_ai.request.top_p"
],
"mapping": {
"type": "double"
}
}
},
{
"all_strings_to_keywords": {
"match_mapping_type": "string",
"mapping": {
"ignore_above": 1024,
"type": "keyword"
}
}
}
],
"date_detection": false,
"properties": {
"@timestamp": {
"type": "date",
"ignore_malformed": false
},
"data_stream": {
"properties": {
"dataset": {
"type": "constant_keyword"
},
"namespace": {
"type": "constant_keyword"
},
"type": {
"type": "constant_keyword",
"value": "logs"
}
}
}
}
},
"aliases": {},
"lifecycle": {
"enabled": true,
"data_retention": "2h"
},
"data_stream_options": {
"failure_store": {
"enabled": true
}
}
}
}