Ingestion latency is affected by a lot of factors, including CPU and memory limits of both the beat and elasticsearch nodes, the network connection between them, and so on. You'll never see logs in the search index instantly but there may be ways to reduce the latency.
scan_frequency specifies how often filebeat should scan its input paths for new files, but it doesn't affect how fast the data in those files is processed ones they're being read. Some diagnostic questions to start with when troubleshooting ingestion speed are: how much delay are you observing between the initial logs and their appearance in elasticsearch? Is the delay steady, or does it vary depending on the time of day or other factors? How much log data (on average) are you trying to transmit? What is the network bandwidth between your beats and your elasticsearch server?
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.