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 486 forks source link

API Level Querying for Activity Events #2009

Open adam-skalicky opened 4 months ago

adam-skalicky commented 4 months ago

Is your feature request related to a problem? Please describe. The API for Activity Events does not have any documented filtering or pagination functionality. This results in any programmatic ingestion or examination having to retrieve the entire log history and filtering the data locally. 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. This results in the events endpoint taking around 1.7s to load and a payload of almost 1MB. The dashboard also uses this endpoint and all the filtering is done in browser, it is unclear how the dashboard would perform if a larger scale deployment was being queried.

Describe the solution you'd like

  1. The API methods to have native filtering based on event type, user, date range, and rows per response with support for offsets.
  2. For the dashboard to utilize the methods defined above when painting the Activity Events page.

Describe alternatives you've considered Truncation of the logs to reduce the overall footprint and response size of returned events. Separate feature request created for this, see context.

Additional context Related to Activity Events Truncation

hmizael commented 1 week ago

Up vote!