ceph-medic icon indicating copy to clipboard operation
ceph-medic copied to clipboard

export to JSON

Open alfredodeza opened this issue 6 years ago • 0 comments

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.

alfredodeza avatar May 28 '19 12:05 alfredodeza