Hi all, i am struggling to setup ILM when sending logs from beats to via Logstash to Elasticsearch.
Im looking to do daily indices, with rollover like the following index naming scheme:
"companyname-winlogbeat-7.7.0--00001" using only "companyname" as a hardcoded value in logstash and the rest coming from metadata and ILM.
I have exported the winlogbeat index templates to json, and edited the index template and index names inside the json to match the new index name, instead of just winlogbeat.
But the ILM does not happen, i can see the ilm policies, but they are not linked to the indices even thought i defined the index pattern.
My logstash output looks the following
Am i on the correct path, or am i going in the wrong direction?
output {
if "COMPANYNAME" in [tags] {
elasticsearch {
ssl => true
cacert => '/etc/logstash/certs/ca.crt'
manage_template => true
template => "/etc/logstash/index_templates/COMPANYNAME-winlogbeat-7.7.0.json"
template_name => "COMPANYNAME-winlogbeat-7.7.0"
template_overwrite => true
hosts => ["es-1.fqdn.com:9200", "es-2.fqdn.com:9200", "es-3.fqdn.com:9200"]
user => "logstash_writer"
password => "PASSWORD"
}
}