in the folder where logstash is looking for, we have a file ( *.log) we come in once per day with cron script. ( cron script del old file and build a new files) After that, we launch logstash in cron.
Why cron ? Because when we add stat_interval => 30 and discover_interval => 30 it don't seems working and we launch it because we have others index to run from differents plugins.
In fact, we are looking for a way to say to logstash :
when you see in the folder1 one new file, you index it according to conf files folder1.conf ( file come once per day )
-when you see new files ( plenty of files come every minutes) in the folder2, you index them according to conf files folder2.conf ( files come from every minutes )
when you see in the folder1 one new file, you index it according to conf files folder1.conf ( file come once per day )
when you see new files ( plenty of files come every minutes) in the folder2, you index them according to conf files folder2.conf ( files come from every minutes )
That's easy. Either use multiple pipelines or have a single pipeline and configure each file input to add a tag or a field that identifies each event, and use that tag or field to select which filters and outputs to use.
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.