Hi guys,
Is it possible to pass the input file path from command line like a system variable or environmental variable and use it inside the logstash configuration in some way???
Thanks,
sam.
Hi guys,
Is it possible to pass the input file path from command line like a system variable or environmental variable and use it inside the logstash configuration in some way???
Thanks,
sam.
No, but you can
-e
startup option.If you tell us more about what you want to achieve we might be able to give you a better answer.
Lets assume my logstash configuration to be
input {
file {
path => "/var/tmp/*"
}
}
i want the ability to pass /var/tmp/* in some manner say like replacement of a variable
input {
file {
path => "$TO_REPLACE"
}
}
and pass TO_REPLACE during start up like logstash -f config.conf -DTO_REPLACE="/var/tmp/*"
Thanks,
sam
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.