How to sends logs from remote machine to Logstash or Elastic Search

Thanks for your response, apericate it. But my elastic search only listening on localhost not Lan ip and due to thisetricbeat is not able to connect from remote machine.. Can you help me to fix it?