Is there a way to make Logstash configuration file dynamic by reading attribute names and types from a different text file (or any other input mechanism).
To explain, if my logstash configuration file looks something like this:
if[@metadata][f] == "SCALE" {
csv {
separator => ","
columns => ["TIMESTAMP", "Machine_ID", "FLAG", "Batch_ID", "Scale", "Op_Name", "Set_Point", "Avg_Wght", "PPM", "T1PPM"]
}
mutate { add_field => { "[@metadata][target_index]" => "dev-mw-1" } }
}
The column names in this configuration are hard coded and each of the field is converted into its respective type using mutate.
Can I take these column names and their data type from some other input source (e.g. a text file), save them into a variable and use that variable? So that whenever Logstash is run, it takes fresh attribute from input and changes the configurations accordingly?