aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Klein <hari@vt100.at>2017-02-10 13:12:46 -0500
committerBryn M. Reeves <bmr@redhat.com>2017-03-28 16:27:54 +0100
commit6b2e85b71568386b0b8e038ee48762fc13851145 (patch)
tree36904f3fcdcd03da12b636e98d0651ce665d4165
parent63e04d1d11702be41a975271f4e825289bb9d15a (diff)
downloadsos-6b2e85b71568386b0b8e038ee48762fc13851145.tar.gz
[ceph] implement log limit and add additional commands
Resolves: #926. Signed-off-by: Harald Klein <hari@vt100.at> (edits for add_copy_spec() usage) Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/ceph.py37
1 files changed, 26 insertions, 11 deletions
diff --git a/sos/plugins/ceph.py b/sos/plugins/ceph.py
index 74b7c4c6..06b86050 100644
--- a/sos/plugins/ceph.py
+++ b/sos/plugins/ceph.py
@@ -22,10 +22,6 @@ class Ceph(Plugin, RedHatPlugin, UbuntuPlugin):
plugin_name = 'ceph'
profiles = ('storage', 'virt')
- option_list = [
- ("log", "gathers all ceph logs", "slow", False)
- ]
-
packages = (
'ceph',
'ceph-mds',
@@ -37,14 +33,26 @@ class Ceph(Plugin, RedHatPlugin, UbuntuPlugin):
)
def setup(self):
+ all_logs = self.get_option("all_logs")
+ limit = self.get_option("log_size")
+
+ if not all_logs:
+ self.add_copy_spec([
+ "/var/log/ceph/*.log",
+ "/var/log/radosgw/*.log",
+ "/var/log/calamari/*.log"], sizelimit=limit)
+ else:
+ self.add_copy_spec([
+ "/var/log/ceph/",
+ "/var/log/calamari",
+ "/var/log/radosgw"
+ ], sizelimit=limit)
+
self.add_copy_spec([
"/etc/ceph/",
- "/var/log/ceph/",
+ "/etc/calamari/"
"/var/lib/ceph/",
- "/var/run/ceph/",
- "/etc/calamari/",
- "/var/log/calamari",
- "/var/log/radosgw"
+ "/var/run/ceph/"
])
self.add_cmd_output([
@@ -56,7 +64,14 @@ class Ceph(Plugin, RedHatPlugin, UbuntuPlugin):
"ceph mon stat",
"ceph mon dump",
"ceph df",
- "ceph report"
+ "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"
])
self.add_forbidden_path("/etc/ceph/*keyring*")
@@ -64,7 +79,7 @@ class Ceph(Plugin, RedHatPlugin, UbuntuPlugin):
self.add_forbidden_path("/var/lib/ceph/*/*keyring*")
self.add_forbidden_path("/var/lib/ceph/*/*/*keyring*")
self.add_forbidden_path("/var/lib/ceph/osd/*")
- self.add_forbidden_path("/var/lib/ceph/osd/mon/*")
+ self.add_forbidden_path("/var/lib/ceph/mon/*")
self.add_forbidden_path("/etc/ceph/*bindpass*")
# vim: set et ts=4 sw=4 :