There are 3 logstash nodes in my BELK arch, and I configure load-balancing in filebeat.
if I use output-plugin to output the messages from 3 logstash nodes to a same file in a shared filesystem, will the new messages overwrite the old ones or will that be conflict?
By the way, it seems that there can define only one file-output in one pipeline config file? and this file will record all the events even if I use if statement.
As there is no coordination around file writing between the Logstash instances, I would expect writing to a shared file to cause serious problems.
If Logstash is opening the output file with O_APPEND (which it should) then all write() operations will be made at the end of the file even if multiple processes write to the file concurrently. See write. This doesn't apply to Windows though.
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.