Having a cron job scheduler for file type input in logstash 5.0?

I'm having the logstash configuration where it picks up the log files from a folder and pushing it to the index.

This is how my input looks like:

  input {        
    	file {
    		path => "/home/chamith/work/ELK/sample_logs/gdcb_logs/GDCBAdapter_tdr.log*"
    		start_position => "beginning" 
    		ignore_older => 0 
    		sincedb_path => "/dev/null"
    	}
    }

I've tried cron schedule for jdbc input, but then I'm quite unsure of doing it for file types.

How can I have a scheduler in the above to check for any new log files or whether any new rows have been added to a log file time to time? Or does the file plugin do this automatically ?

Any help could be appreciated.

The file plugin does this by default. There are a couple of options that allows you to fine tune the behavior.

1 Like

@magnusbaeck thanks :slight_smile:

What could be the options ?

What could be the options ?

See the documentation.

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