]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
ocp-nvme: Add a different formatting for JSON output
authorStephen Bates <sbates@raithlin.com>
Fri, 22 Nov 2024 20:49:35 +0000 (13:49 -0700)
committerDaniel Wagner <wagi@monom.org>
Fri, 20 Dec 2024 10:30:05 +0000 (11:30 +0100)
commit6a73c83b3c07c8a03b55cee86ff7457722037c79
treecf4360b4e7cd10428fa2761c2f5c4f44b954a8f3
parentf258dca4ec460b94bb05de396e73c3193d278cf2
ocp-nvme: Add a different formatting for JSON output

The current OCP JSON format for the SMART extended log page is not
condusive to metric collection via tools like Prometheus. So we add a
new output mode that uses all lower case and underscores (instead of
spaces). This should help with metric collection. At the same time we
clean up some of the field names. We add a new argument
(--output-format-version) to allow us to select which output version
we want. Documentation updated to reflect this change and mark this as
experimental.

Fixes #2577.

Signed-off-by: Stephen Bates <sbates@raithlin.com>
Documentation/nvme-ocp-smart-add-log.txt
plugins/ocp/ocp-print-json.c
plugins/ocp/ocp-print-stdout.c
plugins/ocp/ocp-print.c
plugins/ocp/ocp-print.h
plugins/ocp/ocp-smart-extended-log.c