How can i schedule logstash every second for file input plugin?

Hi All

I want to make schedule in file input like jdbc input and i already used start_interval and discover_interval in my file input but still didn't work.

is there another way for make file input schedule in every 5 second

Thank you
Regards
Kevin

You need to configure the stat_interval ("How often (in seconds) we stat files to see if they have been modified"):
https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-stat_interval

i already config the stat_interval and discover_interval but didn't work
maybe yon can see my configure
input {
file {
path => "D:/elasticsearch/logstash-7.4.2/bin/myfile.csv"
start_position => "beginning"
stat_interval => "1 sec"
discover_interval => "1 sec"
id => "identity"
}
}

You may be hitting this issue, where FriendlyDurations misinterprets seconds as days. Does changing it to 1000 msec help?

thank you badger for your help but still didn't work
is discover_interval must multiply 15 from stat_interval
and my discover_interval didn't work if i used " 15 sec" did you have any idea about this
thank you

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.