Hi guys,
I have a logstash pipeline and i want to be able to set the number of replicas to 0 directly from my logstash.conf file. How can I do this? I have seen some docs with template, but is not working. The one from bellow is not changing the index. I've deleted it and retry but without luck.
input {
kafka {
bootstrap_servers => "kafkaserver:9092"
topics => ["sit.catalogue.item","uat.catalogue.item"]
auto_offset_reset => "earliest"
decorate_events => true
}
}
output {
elasticsearch {
hosts => ["elasticsearch:9200"]
index => "%{[indexPrefix]}-logs-%{+YYYY.MM.dd}"
template => "index.json"
template_name => "*-logs-*"
template_overwrite => "false"
}
}
In my index.json I have
{
"template": "*-log-*",
"settings": {
"number_of_shards": 1,
"number_of_replicas" : 0
}
}
The files are in the same folder:
Thank you!