Hello everybody!. I was wondering if there's a way to either define global variables that I can use from the output.conf file or read them from a given file.
My scenario is the following, in 201-output.conf file I have the following code:
output {
if "_grokparsefailure" in [tags] {
elasticsearch {
hosts => "..."
ssl => true
user => "..."
password => "..."
index => "failure_logs"
}
}
....
}
I would like to read the hosts, user and password fields from a file and inject them there.
I know there's a technology called Logstash Keystore, but as far as I have researched it cannot be automated, you need to manually enter on each machine where Logstash is installed and set the variables that you need to use later on.
Is there a way to accomplish this using a ruby filter?
Thank you all!