Please help me.
What I want is to know how to dynamically change the index during logstash elasticsearch input.
i want this
input {
elasticsearch {
hosts => localhost:9200
index => index-+{yyyy}-{increasing value}
}
}
result
input {
elasticsearch {
hosts => localhost:9200
index => index-2022-52
}
}
I need to be able to set the value to change every day.
ex) Using Linux scripts
Thank you in advance for your help.
You can leverage environment variables.
Your input configuration would look like this:
And then set those variables from your shell just before running Logstash