Multiple TCP output plugins in Logstash

Hi,

I am planning to send logs to 2 different servers over TCP. My output section looks looks something like,

output {
          tcp {
                 host => "XX.X.XXX.XXX" #ip address of server 1
                  mode => "server"
                  port => 689
              }
       tcp {
             host => "XX.X.XXX.XXX" #ip address of server 2
              mode => "server"
              port =>  689
          }
    }

Is there a way to send the logs in Round Robin like LOG A to Server 1 and Log B to Server 2 .?

No, this configuration will send all logs to both servers.

Also, using just one output and setting the two servers in the host will also not work, the tcp output does not support load balancing.

If you need to load balance between those two servers, you will need to have something in front of them.

Thank you Lean. I am very new to Logstash.

Can we apply Fingerprint in Filter and send the output to different servers using IF statements please ?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.