plugins/solidigm: Added wildcard and filters to telemetry parsing.#3022
plugins/solidigm: Added wildcard and filters to telemetry parsing.#3022igaw merged 1 commit intolinux-nvme:masterfrom
Conversation
Added support to jq filter directly in configuration file. Added wildcard support for Telemetry Object version. Signed-off-by: Leonardo da Cunha <[email protected]>
| /* Create jq command and pipe JSON through it */ | ||
| snprintf(cmd, sizeof(cmd), "jq -r '%s'", | ||
| jq_filter_str); | ||
| jq_pipe = popen(cmd, "w"); |
There was a problem hiding this comment.
I find this a bit a wild feature, there are pipes for this?
$ nvme ... | jqThere was a problem hiding this comment.
Yes, we have being sharing configuration files, jq filter files, and instructions to use the command line pipe with our customers. Some customers have to manage multiple configuration files and multiple jq filters, for different products or use cases.
When we have to iterate over some issue to get the most suitable output... file exchange and management goes crazy.
Embedding one or multiple filters in the configuration file reduces the file management overhead on our side and on the customer side.
The same applies to the wildcard support. It allows support for multiple products through the same configuration file
I would prefer to embed libjq over the pipe implementation, but I imagine this would trigger some extensive discussions that feels too early to have.
There was a problem hiding this comment.
@igaw, I understand your suggestion is to keep jq filters in separate files and pipe them via the command line. However, in practice this approach requires managing multiple files—configuration files, filter files, and shell scripts—which creates significant overhead for both our team and customers. By embedding filters directly in the configuration file, we eliminate this complexity and allow a single file to handle multiple products and use cases.
There was a problem hiding this comment.
I really think this is going into the wrong direction in the long run. It contradicts the design principle for a command line tool in Unix/Linux IMO.
Though, I am not maintaining this plugin, thus it's your problem :)
BTW, I don't have a real problem with adding additional library dependencies as long we keep them optional. Obvious less dependency is better but if you have a good use case for I am okay with it.
|
Thanks! |
Added support to jq filter directly in configuration file. Added wildcard support for Telemetry Object version.