I am playing with roolover of indices via ILM. I created index template for all printmessage_charizard_1
indices:
{
"order": 0,
"index_patterns": [
"printmessage_charizard_1-*"
],
"settings": {
"index": {
"lifecycle": {
"name": "my_policy1",
"rollover_alias": "charizard"
},
"number_of_shards": "2",
"number_of_replicas": "1"
}
},
"mappings": {},
"aliases": {}
}
When I send data from logstash, new index is created named printmessage_charizard_1
but it did not have 2 shards. It use default template, 1 shard, 1 replica. When I try the same queries with example from ILM (mentionet above), it works:
{
"order": 0,
"index_patterns": [
"datastream-*"
],
"settings": {
"index": {
"lifecycle": {
"name": "datastream_policy",
"rollover_alias": "datastream"
},
"number_of_shards": "1",
"number_of_replicas": "0"
}
},
"mappings": {},
"aliases": {}
}
If I change index pattern to:
{
"order": 0,
"index_patterns": [
"printmessage_chariz*"
],
"settings": {
"index": {
"lifecycle": {
"name": "my_policy1",
"rollover_alias": "charizard"
},
"number_of_shards": "2",
"number_of_replicas": "1"
}
},
"mappings": {},
"aliases": {}
}
It will match it template partly. It will create printmessage_charizard_1
index with two shards and one replica, but it does not use rollover_alias. So I have there two indices printmessage_charizard_1
- without alias, full of my logs, and printmessage_charizard_1-000001
with alias and empty.
- What does I missing, why does my pattern does not match/or just partly match charizard index?
- Why does it work with datastream index?
- I would expect that star (*) would match any chars.