Hi,
I have a bunch of json files that I'm using logstash to read, then delete, and then those files will eventually be recreated (with either the same contents, or slightly different contents). I'd then like for logstash to read the new/recreated files, but for some reason it discovers them and ignores them. I'm using the following input:
input {
file {
path => "/dir/intake/edi_job_status/*/*.json"
mode => "read"
file_completed_action => "delete"
sincedb_path => "/dev/null"
stat_interval => "30 seconds"
discover_interval => 1
codec => "json"
}
}
It's my understanding that this is supposed to read the files, delete them, then check for new files every 30 seconds. The first two steps work fine, and I'm able to see all of my expected results in Kibana. But after it reads the files once, it never does it again, even when they're recreated. Using trace-level logging I can see that it does indeed discover the new files when they're recreated:
[2019-10-28T16:16:47,098][TRACE][filewatch.discoverer ] discover_files {"count"=>0}
[2019-10-28T16:17:17,099][TRACE][filewatch.readmode.processor] Watched processing
[2019-10-28T16:17:17,099][TRACE][filewatch.readmode.processor] Active processing
[2019-10-28T16:17:17,107][TRACE][filewatch.discoverer ] discover_files {"count"=>79}
[2019-10-28T16:17:39,364][TRACE][logstash.agent ] Converge results {:success=>true, :failed_actions=>[], :successful_actions=>[]}
[2019-10-28T16:17:47,112][TRACE][filewatch.readmode.processor] Watched processing
[2019-10-28T16:17:47,113][TRACE][filewatch.readmode.processor] Active processing
[2019-10-28T16:17:47,124][TRACE][filewatch.discoverer ] discover_files {"count"=>186}
[2019-10-28T16:18:17,127][TRACE][filewatch.readmode.processor] Watched processing
[2019-10-28T16:18:17,128][TRACE][filewatch.readmode.processor] Active processing
[2019-10-28T16:18:17,144][TRACE][filewatch.discoverer ] discover_files {"count"=>201}
[2019-10-28T16:18:47,148][TRACE][filewatch.readmode.processor] Watched processing
[2019-10-28T16:18:47,149][TRACE][filewatch.readmode.processor] Active processing
[2019-10-28T16:18:47,168][TRACE][filewatch.discoverer ] discover_files {"count"=>201}
[2019-10-28T16:19:17,172][TRACE][filewatch.readmode.processor] Watched processing
[2019-10-28T16:19:17,173][TRACE][filewatch.readmode.processor] Active processing
but for some reason it doesn't read them.
Any help would be appreciated.