draios / sysdig

Linux system exploration and troubleshooting tool with first class support for containers
http://www.sysdig.com/
Other
7.8k stars 728 forks source link

new(userspace): suggest plugins to be loaded for unknown filter fields #1918

Closed jasondellaluce closed 2 years ago

jasondellaluce commented 2 years ago

NOTE: based on top of https://github.com/draios/sysdig/pull/1911 and on hold until it's merged

When encountering unknown filter fields, now sysdig can look into all its known plugins and suggest which ones can be loaded to make a given field supported for extraction.

Example:

> sysdig "json.value=test"
filter contains an unknown field 'json.value', and none of the loaded plugins is capable of extracting it

> SYSDIG_PLUGIN_DIR=./plugins sysdig "json.value=test"
filter contains an unknown field 'json.value', but it can be supported by loading one of these plugins: json

> SYSDIG_PLUGIN_DIR=./plugins sysdig -H json "json.value=test"
...