Open blotus opened 7 months ago
@blotus: Thanks for opening an issue, it is currently awaiting triage.
In the meantime, you can:
@blotus: There are no 'kind' label on this issue. You need a 'kind' label to start the triage process.
/kind feature
/kind enhancement
/kind bug
/kind packaging
/kind bug
A viable option seems to be:
We are using fsnotify/fsnotify to watch for new files if the user specifies a glob pattern.
Unfortunately,
fsnotify
hardcodes the events for which we are notified (see here)Because crowdsec always adds an inotify watch on the parent directory if the user provides a glob pattern, if this directory contains a lot of files that are written constantly to, we are at risk of overflowing the kernel event queue, even though we are not interested in the events.
fsnotify
has a longstanding issue about event filtering, but there does not seem to be a consensus on how it should be handled.I see a few options available to us:
fsnotify
and do our own minimalist implementation (the main complexity will probably be the cross-platform support)fsnotify
(the better option long term , but it will probably take some back-and-forth and some time)