PUT _template/.infini_alert-history-rollover
{
"order" : 100000,
"index_patterns" : [
".infini_alert-history*"
],
"settings" : {
"index" : {
"format" : "7",
"lifecycle" : {
"name" : "infini_metrics-30days-retention",
"rollover_alias" : ".infini_alert-history"
},
"codec" : "best_compression",
"number_of_shards" : "1",
"translog.durability":"async"
}
},
"mappings" : {
"dynamic_templates" : [
{
"strings" : {
"mapping" : {
"ignore_above" : 256,
"type" : "keyword"
},
"match_mapping_type" : "string"
}
}
]
},
"aliases" : { }
}
DELETE .infini_alert-history
DELETE .infini_alert-history-00001
PUT .infini_alert-history-00001
{
"settings": {
"index.lifecycle.rollover_alias":".infini_alert-history"
, "refresh_interval": "5s"
},
"aliases":{
".infini_alert-history":{
"is_write_index":true
}
},
"mappings": {
"properties" : {
"condition" : {
"properties" : {
"items" : {
"properties" : {
"expression" : {
"type" : "keyword",
"ignore_above" : 256
},
"minimum_period_match" : {
"type" : "long"
},
"operator" : {
"type" : "keyword",
"ignore_above" : 256
},
"severity" : {
"type" : "keyword",
"ignore_above" : 256
},
"values" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"operator" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"condition_result" : {
"type" : "object",
"enabled" : false
},
"context" : {
"type" : "keyword",
"copy_to" : [
"search_text"
]
},
"created" : {
"type" : "date"
},
"expression" : {
"type" : "keyword",
"copy_to" : [
"search_text"
]
},
"id" : {
"type" : "keyword"
},
"is_escalated" : {
"type" : "boolean"
},
"is_notified" : {
"type" : "boolean"
},
"message" : {
"type" : "keyword",
"ignore_above" : 256
},
"objects" : {
"type" : "keyword",
"copy_to" : [
"search_text"
]
},
"resource_id" : {
"type" : "keyword"
},
"resource_name" : {
"type" : "keyword"
},
"rule_id" : {
"type" : "keyword"
},
"rule_name" : {
"type" : "keyword"
},
"search_text" : {
"type" : "text",
"analyzer" : "suggest_text_search",
"index_prefixes" : {
"min_chars" : 2,
"max_chars" : 5
},
"index_phrases" : true
},
"severity" : {
"type" : "keyword"
},
"state" : {
"type" : "keyword",
"ignore_above" : 256
},
"title" : {
"type" : "keyword"
},
"updated" : {
"type" : "date"
}
}
}
}