Please help:
logstash output:
I have a index template for logstash, which i defined in logstash output:
output {
elasticsearch {
hosts => ["https://elasticsearchurl.domain.com:9200"]
user => 'logstash_internal'
password => "${es_pwd}"
ssl => true
cacert => '/path/to/ca-bundle.trust.crt'
sniffing => false
index => "log-%{+yyyy.MM.dd}"
}
}
I have a policy which is:
PUT _ilm/policy/log_policy
{
"policy": {
"phases": {
"hot": {
"actions": {
"rollover": {
"max_docs": 20,
"max_age": "1h"
}
}
},
"delete": {
"min_age": "1h",
"actions": {
"delete": {}
}
}
}
}
}
and an index template, which is assigned to policy and has a pattern to get logstash data, and rollover_alias is log
PUT _template/log_template
{
"index_patterns": ["log-*"],
"settings": {
"number_of_shards": 1,
"number_of_replicas": 1,
"index.lifecycle.name": "log_policy",
"index.lifecycle.rollover_alias": "log"
}
}
As per document, I created the bellow index manually
PUT log-000001
{
"aliases": {
"log": {
"is_write_index": true
}
}
}
But I get the following error, during roll over action:
"index.lifecycle.rollover_alias [log] does not point to index [log-2019.07.27]",
Please can you help?