I precreated Elasticsearch indexes with alias "logstash-beats" and "logstash-postgres" and that works fine with Logstash output.
However I would also like to completely disable logstash from creating new indexes at all (for when they have not yet been creaed) and for the life of me cannot find a combination of settings below to do that.
No matter which way I include these settings logstash still creates the indexes if they dont exist. Shouldnt having "manage_template => false" do the trick?
I also tried manage_template => "false" with no luck
if [docker][container][labels][com_docker_compose_service] == "beats" {
elasticsearch {
hosts => ["elasticsearch7:9200"]
manage_template => false
template_overwrite => false
template_name => "logstash-beats"
ilm_enabled => false
index => "logstash-beats"
}
}
else if [docker][container][labels][com_docker_compose_service] == "postgres" {
hosts => ["elasticsearch7:9200"]
manage_template => false
template_overwrite => false
template_name => "logstash-postgres"
ilm_enabled => false
index => "logstash-postgres"
}
}
else {
null{}
}