Real time data how processing in elastic search

my project aim real time sensor data live demo on kibana.
data come some ip port:1212
how to capture and how to push eslastic search ....any idea tell
i try logstash cannot load but logstash configuration method any one

Use the below code block in the logstash filter. It will send the parsed output to Elasticsearch

output {
elasticsearch {
hosts => ["<IP:Port>"]

i want full code input,filter.output
any one llink sen me