Open lucgiang-novobi opened 1 year ago
@lucgiang-novobi: Thanks for opening an issue, it is currently awaiting triage.
In the meantime, you can:
@lucgiang-novobi: 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
Other solution, could we store Logs Stream reading token into file, and load this file before starting acquisition modules. CW stream reading token variable
streamIndexMutex.Lock()
v := cw.streamIndexes[cfg.GroupName+"+"+cfg.StreamName] # store this variable into file
streamIndexMutex.Unlock()
Hello @lucgiang-novobi !
Thanks for the report. Storing a token right now wouldn't be easy on the agent (no other datasource does it).
Would "simply" not starting from head every time do the trick? (ie. setting StartFromHead
to false ?)
Hello @lucgiang-novobi !
Thanks for the report. Storing a token right now wouldn't be easy on the agent (no other datasource does it). Would "simply" not starting from head every time do the trick? (ie. setting
StartFromHead
to false ?)
Yes, we need a configuration parameter to decide whether CrowdSec reads logs from the first event or last specific duration (i.e 30 minutes before). Reading the entirety of the log events at the beginning is not effective because Crowdsec should work with log events in real-time (or near real-time).
Hi @buixor , Do you have any solution for this issue? Please let me know. Thank you!
Add time range limitation in CloudWatch log stream datasource
/kind enhancement When CrowdSec start reading from CloudWatch logs stream, it read entire log events(from earliest events). It can make duplicated events when we restart a CrowdSec container with same configuration. Should we have startTime and endTime parameters in GetLogEventsPagesWithContext
Why is this needed?
To avoid reading entirely large CloudWatch log stream when using CloudWatch datasource.