So the hostname should be dynamic from the environmentla variables of OS level.
I can use ${hostname} variable in shell script. same way, can I use hostname variable in logstash.yml or pipelines.yml or logstash.conf?
I want to make the configurations so that on any host i can use same dynamic config files and no need to change everytime.
Anybody has the sampel code for that?
You need to put the ENV variable in /etc/default/logstash on the Logstash node after which you can use the ENV variable with for example ${HOSTNAME} in your pipelines.
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.