aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2019-09-05 17:10:34 +0200
committerBryn M. Reeves <bmr@redhat.com>2019-10-03 14:42:27 +0100
commitc08657af4d13c4eb6630dabdcd332b31ccd09be8 (patch)
treeac998356638c7d17a0d6810fb0b59059972c8523
parentad537d205ccc2b105b7362ab673fb90560d7725a (diff)
downloadsos-c08657af4d13c4eb6630dabdcd332b31ccd09be8.tar.gz
[ceph] collect journal logs for ceph services
Enable the plugin also by presence of either service, and collect journal logs of the services. Resolves: #1776 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/plugins/ceph.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/sos/plugins/ceph.py b/sos/plugins/ceph.py
index 8c40a3bd..4008f733 100644
--- a/sos/plugins/ceph.py
+++ b/sos/plugins/ceph.py
@@ -7,6 +7,7 @@
# See the LICENSE file in the source distribution for further information.
from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin
+from socket import gethostname
class Ceph(Plugin, RedHatPlugin, UbuntuPlugin):
@@ -15,6 +16,7 @@ class Ceph(Plugin, RedHatPlugin, UbuntuPlugin):
plugin_name = 'ceph'
profiles = ('storage', 'virt')
+ ceph_hostname = gethostname()
packages = (
'ceph',
@@ -26,6 +28,13 @@ class Ceph(Plugin, RedHatPlugin, UbuntuPlugin):
'librados2'
)
+ services = (
+ 'ceph-nfs@pacemaker',
+ 'ceph-mds@%s' % ceph_hostname,
+ 'ceph-mon@%s' % ceph_hostname,
+ 'ceph-mgr@%s' % ceph_hostname
+ )
+
def setup(self):
all_logs = self.get_option("all_logs")
@@ -86,6 +95,9 @@ class Ceph(Plugin, RedHatPlugin, UbuntuPlugin):
"ceph %s --format json-pretty" % s for s in ceph_cmds
], subdir="json_output")
+ for service in self.services:
+ self.add_journal(units=service)
+
self.add_forbidden_path([
"/etc/ceph/*keyring*",
"/var/lib/ceph/*keyring*",