How to config filebeat collecting and send log every second?

hi, I want to collect log and send to es as quickly as possible

So I set

  • type: filestream
    id: login
    backoff:
    init: 1s
    max: 1s

and open the output debug mode
and when I write log to log file and about four seconds later, the log server debug log said receive the log
My scence is the number of logs is little every minute.

Is there any config let log collect and send to log server in 1 seconds?

thanks

Hi @dw130, Welcome to the Elastic community.

It seems you using filebeat to read logfile. There are some processes involved, such as tracking files, reading data, maintaining connections, and making bulk requests, may introduce some latency. Additionally, external factors like network latency, hardware performance, and tuning can also affect the speed of log ingestion.

You can try some tuning by changing the preset.