-
Notifications
You must be signed in to change notification settings - Fork 733
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
Chisels don't respect display filters #247
Comments
Solving this problem effectively requires understanding the intent of display_filter and chisel encapsulation. My understanding of the intent of chisels is to provide a mechanism that encapsulates useful functionality in a specific, but useful way. The lsof chisel gives us file utilization; the echo_fds pretty prints buffer contents; the spectrogram gives us latency visualization. These chisels are all of a class that provide their own direct output. I could imagine a second class of chisels that are effectively super filters. An example would be a chisel that filters out all processes that exist prior to the start of the capture; alternatively an advanced user could write a site/system-specific chisel for colleagues that help them remove extraneous information. Expected usage would be: $ sysdig -r original.scap -c filter_preexisting -c filter_db_admins -c lsof Why do I touch on all this when the topic is display_filter? Chisels control screen output, disregarding anything the sysdig client might want to do. That's what causes this bug; chisels write directly to the screen and the sysdig client has no chance to apply the display_filter. I think cleaning up this behaviour allows us to specifically set expectations for what multiple chisels (and possibly, multiple filters) can do. Currently, we have three behaviours:
I can imagine more behaviours: A first change would be to implement display_filter as a flag that has it’s own filter argument; this allows behaviour 4. To allow behaviour 5, you would either want to pass the display filter to the chisel (and ask all chisels to comply), or expose a buffer to the chisel where it can write its results (this buffer is then display_filtered by the sysdig binary). This latter solution allows behaviour 6 (it takes the write-back buffer and passes it as input to chisel2). However, this is tricky, because how do we accomodate chisels like spectrogram that need to write directly to the screen? Thanks for listening to all this. I want to help implement something, I just want to know the most flexible path forward before making that first step. |
does this make sense as a behaviour: i.e specifying multiple filters on a command line? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Will not respect the filter, and will show all the traffic anyway.
The text was updated successfully, but these errors were encountered: