One Tcp port with multiple sources


(ssh) #1

hi community

I use tcp input plugin to get streaming data in logstash.
I identify different sources by port.
eg:

tcp {
port => 5513
add_field => { "source_type" => "SourceA" }
}
tcp {
port => 5512
add_field => { "source_type" => "SourceB" }
}
tcp {
port => 5511
add_field => { "source_type" => "SourceC" }
}

Now I want to use one tcp port but still want to identify SourceA/ SourceB/ SourceC at input part.
Is that possible? Plz guide to me how to do that using tcp plugin?
OR plz advise which input plugin is suitable for streaming instead of tcp??

Appreciate!