Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add New CLI: traceectl #4419

Open
8 tasks
ShohamBit opened this issue Dec 8, 2024 · 0 comments · May be fixed by #4396
Open
8 tasks

Add New CLI: traceectl #4419

ShohamBit opened this issue Dec 8, 2024 · 0 comments · May be fixed by #4396

Comments

@ShohamBit
Copy link
Collaborator

ShohamBit commented Dec 8, 2024

Add New CLI: traceectl

Description

Introduce a new client called traceectl for managing Tracee's policies, events, streams, plugins, and diagnostics. This CLI tool will provide structured and user-friendly commands for Tracee users to interact with its various components efficiently.

Design Overview

traceectl will be organized into several management categories: Policy Management, Event Management, Stream Management, Plugin Management, and Additional Commands. Each category will have well-defined subcommands to perform specific actions. The CLI will follow a consistent command structure for ease of use.


Event Management

  • Commands:
    • traceectl event list: List all available event definitions.
    • traceectl event describe <event_name>: Get detailed information about a specific event.
    • traceectl event enable <event_name>: Enable capturing of a specific event.
    • traceectl event disable <event_name>: Disable capturing of a specific event.

Stream Management

  • Commands:
    • `traceectl stream : stream events from tracee

Additional Commands

  • traceectl metrics [--output <format>]: Retrieve Tracee's performance metrics.
  • traceectl version: Display the version of traceectl.

Usage

traceectl [flags] [options]

Use traceectl <command> --help for more details about a specific command.
Use traceectl options to view global command-line options.

Global Flags

  • -h, --help: Help for traceectl.
  • -s, --server='': Address and port of the Tracee server.

Implementation Plan

  1. Design the traceectl CLI framework using Cobra.
  2. Implement core commands (Policy Management, Event Management, Stream Management, Plugin Management).
  3. Add global flags and logging verbosity support.
  4. Create unit tests and mock environments for each command.
  5. Document usage examples and integrate --help output for all commands.
  6. Test the CLI in real-world scenarios and refine the UX.

Tasks

General

  • Create the traceectl repository.

Event Management

  • Implement event list command.
  • Implement event describe command.
  • Implement event enable command.
  • Implement event disable command.

Stream Management

  • Implement stream command.

Additional Commands

  • Implement metrics command.
  • Implement version command.

Additional Notes

This issue tracks the development of traceectl as a central client for interacting with Tracee.

@ShohamBit ShohamBit linked a pull request Dec 8, 2024 that will close this issue
@yanivagman yanivagman added this to the v0.23.0 milestone Dec 8, 2024
@yanivagman yanivagman linked a pull request Dec 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants