It's a bit disheartening when tools force a change like this in machine-readable output (such as JSON), as it is highly likely that the output is being consumed by some other script or application, which expects the output to be in a particular structure.
I'll leave this here as a reminder / placeholder. I'll have to try to make some time to refactor the nvme_metrics.py collector. Hopefully we can avoid having to support two different JSON formats, since the verbose output can be produced by older nvme-cli versions by appending --verbose to the command line options. This is probably the right time to finally drop the older nvme_metrics.sh collector too.
nvme-cli v2.11 now defaults to outputting verbose JSON output, with apparently no way to revert back to the previous "terse" output.
For the command
nvme list -o json
, the previous output (with nvme-cli v2.10) resembled the following:With nvme-cli v2.11, that exact same command now results in this:
This obviously breaks the nvme textfile collector, as it is not expecting to parse the verbose output.
As far as I can tell, this was annotated in the v2.11 release notes as:
It's a bit disheartening when tools force a change like this in machine-readable output (such as JSON), as it is highly likely that the output is being consumed by some other script or application, which expects the output to be in a particular structure.
I'll leave this here as a reminder / placeholder. I'll have to try to make some time to refactor the
nvme_metrics.py
collector. Hopefully we can avoid having to support two different JSON formats, since the verbose output can be produced by older nvme-cli versions by appending--verbose
to the command line options. This is probably the right time to finally drop the oldernvme_metrics.sh
collector too.cc: @SuperQ