[PR #4350] Add 'Generate Debug Bundle' feature via Management server and Dashboard #4211

Open
opened 2025-11-20 08:07:56 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/4350

State: closed
Merged: No


Describe your changes

We’re adding a "Generate Debug Bundle" feature to the Dashboard.
When clicked, this button will:

  1. Send a request from the Dashboard to the Management server.
  2. The Management server will send a notification to the target peer’s NetBird client over the existing Management stream.
  3. The client will run the built-in debug bundle or debug for 1m command.
  4. The client uploads the logs to the configured storage backend.
  5. The Management server returns an upload key to the Dashboard so the user can retrieve the logs.

Implementation Details

  • Extend the existing Management ↔ Client stream to support custom message types (e.g., CONFIG_UPDATE, DEBUG).
  • Use a oneof in the protobuf to allow flexible payloads for different message types.
  • Implement debug triggering logic on the client side.
  • Add server logic to relay debug requests and return the upload key to the dashboard.

TODO

  • Protocol changes

    • Extend protobuf with:
      • enum NotificationType { CONFIG_UPDATE = 1; DEBUG = 2; }
      • oneof payload { ... } for flexible request/response payloads.
      • Add NotificationType to both request and response messages.
  • fix all tests and make sure current functionality is still working

  • add debugging call

  • implement the api endpoint and make sure it will call the debugging

**Original Pull Request:** https://github.com/netbirdio/netbird/pull/4350 **State:** closed **Merged:** No --- ## Describe your changes We’re adding a "Generate Debug Bundle" feature to the Dashboard. When clicked, this button will: 1. Send a request from the Dashboard to the Management server. 2. The Management server will send a notification to the target peer’s NetBird client over the existing Management stream. 3. The client will run the built-in debug bundle or debug for 1m command. 4. The client uploads the logs to the configured storage backend. 5. The Management server returns an upload key to the Dashboard so the user can retrieve the logs. ### Implementation Details - Extend the existing Management ↔ Client stream to support custom message types (e.g., `CONFIG_UPDATE`, `DEBUG`). - Use a `oneof` in the protobuf to allow flexible payloads for different message types. - Implement debug triggering logic on the client side. - Add server logic to relay debug requests and return the upload key to the dashboard. ### TODO - [x] **Protocol changes** - Extend protobuf with: - enum NotificationType { CONFIG_UPDATE = 1; DEBUG = 2; } - oneof payload { ... } for flexible request/response payloads. - Add NotificationType to both request and response messages. - [ ] fix all tests and make sure current functionality is still working - [ ] add debugging call - [ ] implement the api endpoint and make sure it will call the debugging
saavagebueno added the pull-request label 2025-11-20 08:07:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#4211