Closed nerzhul closed 4 years ago
What the name of target rollover index name?
ILM index handling is not same for logstash_format=true mechanism.
If you want to stop using datetime format for ILM index, please specify index_date_pattern as ""
empty string.
hello, i may be wrong i my configuration. Here is the ILM policy:
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_age": "90d",
"max_size": "30gb"
}
}
}
}
}
}
do i missed something ?
@cosmo0920 , adding index_date_pattern ""
enhance the behaviour thanks, but it doesn't work either.
Now we dropped the date, nice, but why it wants logstash-default always ?
2019-12-18 08:58:12 +0000 [warn]: #0 failed to flush the buffer. retry_time=7 next_retry_seconds=2019-12-18 08:59:21 +0000 chunk="599f6a0cf0be5c223007b7a48132bff1" error_class=Elasticsearch::Transport::Transport::Errors::NotFound error="[404] {\"error\":{\"root_cause\":[{\"type\":\"index_not_found_exception\",\"reason\":\"no such index [logstash-default-000001]\",\"index_uuid\":\"_na_\",\"resource.type\":\"index_or_alias\",\"resource.id\":\"logstash-default-000001\",\"index\":\"logstash-default-000001\"}],\"type\":\"index_not_found_exception\",\"reason\":\"no such index [logstash-default-000001]\",\"index_uuid\":\"_na_\",\"resource.type\":\"index_or_alias\",\"resource.id\":\"logstash-default-000001\",\"index\":\"logstash-default-000001\"},\"status\":404}"
i also have a template as described in ES documentation:
{
"order": 2,
"index_patterns": ["k8s-*"],
"settings": {
"number_of_shards": 3,
"index.lifecycle.name": "k8s",
"index.lifecycle.rollover_alias": "k8s"
},
"mappings": {}
}
@cosmo0920 found the issue, it's a bug in your logging in fluentd. I created the init indice for the ILM policy and now it works as intended :) it seems you don't honor the index_name in the logging part. What i propose as enhancements for the plugin:
(check apply)
Problem
The plugin tries to apply logstash default name pattern on index whereas i doesn't want because i'm enabling ILM
I have same problem if i remove the 2 lines with logstash_* keys
Steps to replicate
Here is the configuration
Expected Behavior or What you need to ask
...
Using Fluentd and ES plugin versions