You should install Filebeat on the server where the logs are generated and let it forward the logs to the Elasticsearch server that is on a different machine.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.