Hi!
I have two logstash nodes in a cluster
I want both Logstash to output a txt file with a name something like
index_name-2019.09-node1
being "node1" the HOSTNAME of the logstash node. So each logstash node would output a diferent file name.
I try
@echo HOSTNAME
and I have this result
logstash_node_1
My logstash output config looks like
output {
file {
id => "outputTest"
path => "/test/index_name-%{+YYYY-MM}_${HOSTNAME:12345}.txt"
codec => line { format => "%{message}"}
}
}
However, the text file name it creates is
index_name-2019.09_12345.txt
I start logstash as a service by typing:
sudo systemctl start logstash.service
Thanks a lot in advance!