[Solved]Tcp input/output

I have two logstash instances on two machines, trying to receive json from to the other,
In the receiver I have:

input {
tcp {
port => 9302
codec => "json"
}
}

And in the sender I have

output{
tcp{
mode => "client"
host => "(Host_IP)"
port => 9302
codec => "json"
}
}

I think there is traffic sometimes, but not as I expected, am I doing something wrong? Thanks!

How did you solve this?
Providing the answer might help someone else in the future :slight_smile:

Absolutely

I changed it too the following config, don't know if the change solved the problem but it works for me now

output{
tcp{
mode => "client"
host => "<host_ip>"
port => 5000
codec => "json_lines"
}
}
input {
tcp {
port => 5000
codec => "json_lines"
}
}

2 Likes

Thank you for posting the answer - this was a big help for me today.

1 Like