diff options
author | Daniel Alvarez <dalvarez@redhat.com> | 2019-07-23 12:44:07 +0200 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-10-01 14:43:44 +0100 |
commit | 66ff2902dc934b4c6b69baaf917f46dc4bd0d534 (patch) | |
tree | d004a8ecab856cb6504fb62abea97dbe1c37f552 | |
parent | d2d5b9da6d4af7ead8a47468db0bbfcc8fb2b5bf (diff) | |
download | sos-66ff2902dc934b4c6b69baaf917f46dc4bd0d534.tar.gz |
[ceph] Ceph commands output enhancement
Add json-pretty output for most of the useful commands
for easier consumption by Automation tools
Resolves: #1726
Signed-off-by: Robin Cernin rcerninr@redhat.com
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/ceph.py | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/sos/plugins/ceph.py b/sos/plugins/ceph.py index dc2f5079..8c40a3bd 100644 --- a/sos/plugins/ceph.py +++ b/sos/plugins/ceph.py @@ -50,28 +50,42 @@ class Ceph(Plugin, RedHatPlugin, UbuntuPlugin): ]) self.add_cmd_output([ - "ceph status", - "ceph health detail", - "ceph osd tree", - "ceph osd stat", - "ceph osd dump", "ceph mon stat", "ceph mon_status", "ceph quorum_status", - "ceph mon dump", - "ceph df", + "ceph osd erasure-code-profile ls", "ceph report", - "ceph osd df tree", - "ceph fs dump --format json-pretty", - "ceph fs ls", - "ceph pg dump", - "ceph health detail --format json-pretty", "ceph osd crush show-tunables", "ceph-disk list", "ceph versions", - "ceph osd crush dump" + "ceph osd crush dump", + "ceph -v" ]) + ceph_cmds = [ + "status", + "health detail", + "osd tree", + "osd stat", + "osd df tree", + "osd dump", + "osd df", + "mon dump", + "df", + "df detail", + "fs ls", + "fs dump", + "pg dump", + ] + + self.add_cmd_output([ + "ceph %s" % s for s in ceph_cmds + ]) + + self.add_cmd_output([ + "ceph %s --format json-pretty" % s for s in ceph_cmds + ], subdir="json_output") + self.add_forbidden_path([ "/etc/ceph/*keyring*", "/var/lib/ceph/*keyring*", |