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

Support the option for defaulte grpc unix listent #4388

Open
ShohamBit opened this issue Nov 19, 2024 · 4 comments
Open

Support the option for defaulte grpc unix listent #4388

ShohamBit opened this issue Nov 19, 2024 · 4 comments

Comments

@ShohamBit
Copy link
Collaborator

If you try to run tracee with the flag:

--grpc-listen-addr 

it requires you to put parameter like:

unix:/tmp/tracee.sock

or

tcp:4466

in order to just config tracee with the gRPC option

so I suggest 2 things:

  1. every time you run tracee it will also run a gRPC with Unix socket as default
  2. every time you use the flag grpc-listen-addr as default is will use the Unix with /tmp/tracee.sock as default
@NDStrahilevitz
Copy link
Collaborator

NDStrahilevitz commented Nov 21, 2024

Good idea. I think we can have it tiered to these options (simplify as you see fit):

  1. change the flag to --grpc
  2. when using the flag alone use the default unix socket
  3. when using the flag as --grpc unix, --grpc tcp etc. use the protocol with some default output point (if possible, for example in tcp the default port may be taken).
  4. Lastly keep the current usage possible (such as --grpc unix:/my/socket/here.

@ShohamBit
Copy link
Collaborator Author

Is --grpc the right flag for it? Maybe call the flag server, or we already have --server so that is not an option?

@ShohamBit
Copy link
Collaborator Author

Hey @NDStrahilevitz

I wanted to get your opinion on the --grpc flag. Should it have a default value, or is it okay as is? Currently, when I try to use the flag like this:

tracee --grpc

I get the following error:

Error: flag needs an argument: --grpc
Run 'tracee --help' for usage.

I already made that the flag requires an argument like unix or tcp, so I need to use it this way:

tracee --grpc tcp

or

tracee --grpc unix

Do you think this is the right approach, or should we make a change to improve usability? For example, should we add a default value for the flag, or handle this scenario differently?

Looking forward to your thoughts!

@NDStrahilevitz
Copy link
Collaborator

Gut feeling, I think just --grpc should default to the unix socket if unspecified.

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