Configure Logstash to wait before parsing a file -
i wonder if can configure logstash in following way:
background info:
every day xml file pushed server, should parsed.
to indicate complete file transfer afterwards empty .ctl (custom file) transfered same folder.
the files both have following name schema 'feedback_{year}{yearday}_utc{hoursminutesseconds}_51.{extention}' (e.g. feedback_16002_utc235953_51.xml). have same file name 1 .xml , other .ctl file.
question:
is there way configure logstash wait parsing xml file until according .ctl file present?
edit: there maybe way archiev filebeat?
edit2: enough able configure logstash in way wait x minutes before starting process new file, if easier.
thanks in advance
your problem don't want start parser before file transfer hasn't been completed. so, why don't push data file (file-complete.xml) when find flag file (empty.ctl)?
here possible logic script , runs using crontab:
- if empty.ctl exists:
- clear file-complete.xml
- add content of file.xml file-complete.xml.
- remove empty.ctl
this way, you'd need parse data file-complete.xml. think simpler debug , configure.
hope helps,
Comments
Post a Comment