|
| 1 | +# TraceeCtl Installation and Usage Guide |
| 2 | + |
| 3 | +## Installation |
| 4 | + |
| 5 | +To use **TraceeCtl**, you first need to compile and install the tool. Follow these steps to get started: |
| 6 | + |
| 7 | +1. **Clone the Repository** |
| 8 | + |
| 9 | + Begin by cloning the Tracee repository to your local machine and navigating to traceectl: |
| 10 | + |
| 11 | + ``` bash |
| 12 | + git clone [URL-to-your-repo](https://github.com/aquasecurity/tracee.git) |
| 13 | + cd cmd/traceectl |
| 14 | + ``` |
| 15 | + |
| 16 | +2. **Build and Install** |
| 17 | + |
| 18 | + Compile and install TraceeCtl using the following commands: |
| 19 | + |
| 20 | + ``` bash |
| 21 | + make build |
| 22 | + make install |
| 23 | + ``` |
| 24 | + |
| 25 | +## Configuring Tracee for TraceeCtl |
| 26 | + |
| 27 | +To use TraceeCtl effectively, you need to configure Tracee so that it can communicate with TraceeCtl over a Unix socket. This can be done by running Tracee with the correct gRPC settings: |
| 28 | + |
| 29 | +1. **Run Tracee with gRPC Unix Socket** |
| 30 | + |
| 31 | + Use the following command to start Tracee with gRPC support over a Unix socket: |
| 32 | + |
| 33 | + ``` bash |
| 34 | + tracee --grpc-listen-addr unix:/var/run/tracee.sock |
| 35 | + ``` |
| 36 | + |
| 37 | + This command sets up Tracee to listen for incoming connections from TraceeCtl at the specified Unix socket path (`/var/run/tracee.sock`). Ensure that this socket path is accessible and not blocked by permissions or other constraints. |
| 38 | + |
| 39 | +## Usage |
| 40 | + |
| 41 | +Once TraceeCtl is installed and Tracee is running, you can use various commands to interact with Tracee. Below are the main commands provided by TraceeCtl: |
| 42 | + |
| 43 | +- Stream Events: traceectl stream |
| 44 | + |
| 45 | +- Events management: traceectl event |
| 46 | + |
| 47 | +- Retrieve Metrics: traceectl metrics |
| 48 | + |
| 49 | +- Check Version: traceectl version |
| 50 | + |
| 51 | +For more inf about the TraceeCtl command please refer to the appoint command documentation |
| 52 | + |
| 53 | +## Flags |
| 54 | + |
| 55 | +- server: Specifies the connection type, either unix or tcp. |
| 56 | + |
| 57 | + ``` bash |
| 58 | + traceectl --server unix:/unix/socket/path.sock |
| 59 | + ``` |
| 60 | + |
| 61 | +- output: Defines the output destination, such as stdout or a file. |
| 62 | + |
| 63 | + ``` bash |
| 64 | + traceectl stream --output file:/path/to/output.txt |
| 65 | + ``` |
| 66 | + |
| 67 | +## Summary |
| 68 | + |
| 69 | +- **Install TraceeCtl** by cloning the repository, building, and installing it with `make`. |
| 70 | +- **Configure Tracee** by running it with the appropriate gRPC Unix socket settings. |
| 71 | +- **Use TraceeCtl** to interact with Tracee via commands like `stream`, `event`, `metrics`, and `version`. |
0 commit comments