netbirdio / netbird

Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
10.78k stars 487 forks source link

Activity Events Truncation #2008

Open adam-skalicky opened 4 months ago

adam-skalicky commented 4 months ago

Is your feature request related to a problem? Please describe. There does not appear to be a truncation option for event logs. In our modest early adopter setup, we already have 2500+ entries for about 5% of our target user footprint with under a month of daily use. There is a concern that the log file sizes and accessibility will become unmanageable at scale. As the logs are stored in SQL Lite, it is difficult to build external log truncation as there may be locking issues.

Describe the solution you'd like A configurable max log life (preferably expressed as a time/number of days) that results in logs exceeding this value to be automatically truncated from the database.

Describe alternatives you've considered External truncation scripts (like a cronjob) - a little hacky and runs into locking issues. A delete API method - This raises a host of security issues.

Additional context Related to API Level Querying for Activity Events