Right now, all results are for a terminal user running the tool in the foreground. Other systems that may want to consume results to display them (e.g. the Ceph dashboard) will benefit from exporting to JSON instead of the rich terminal output.
A new flag called --format should be added to the check sub-command, that defeaults to plain, but can be set to json so that output is returned as plain JSON. The call should look like:
$ ceph-medic check --format=json
Most of the work for this is already done as the reporting tooling in ceph-medic is a big dictionary that gets passed on to the various functions that use it to format to terminal output.
Right now, all results are for a terminal user running the tool in the foreground. Other systems that may want to consume results to display them (e.g. the Ceph dashboard) will benefit from exporting to JSON instead of the rich terminal output.
A new flag called
--format
should be added to thecheck
sub-command, that defeaults toplain
, but can be set tojson
so that output is returned as plain JSON. The call should look like:Most of the work for this is already done as the reporting tooling in ceph-medic is a big dictionary that gets passed on to the various functions that use it to format to terminal output.