Server IP : 127.0.0.2 / Your IP : 3.148.217.66 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/sosreport/sos/plugins/ |
Upload File : |
# This file is part of the sos project: https://github.com/sosreport/sos # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # version 2 of the GNU General Public License. # # 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): """CEPH distributed storage """ plugin_name = 'ceph' profiles = ('storage', 'virt') ceph_hostname = gethostname() packages = ( 'ceph', 'ceph-mds', 'ceph-common', 'libcephfs1', 'ceph-fs-common', 'calamari-server', 'librados2' ) services = ( 'ceph-nfs@pacemaker', 'ceph-mds@%s' % ceph_hostname, 'ceph-mon@%s' % ceph_hostname, 'ceph-mgr@%s' % ceph_hostname, 'ceph-radosgw@*', 'ceph-osd@*' ) def setup(self): all_logs = self.get_option("all_logs") if not all_logs: self.add_copy_spec([ "/var/log/ceph/*.log", "/var/log/radosgw/*.log", "/var/log/calamari/*.log" ]) else: self.add_copy_spec([ "/var/log/ceph/", "/var/log/calamari", "/var/log/radosgw" ]) self.add_copy_spec([ "/etc/ceph/", "/etc/calamari/", "/var/lib/ceph/", "/run/ceph/" ]) self.add_cmd_output([ "ceph mon stat", "ceph mon_status", "ceph quorum_status", "ceph mgr module ls", "ceph mgr metadata", "ceph osd metadata", "ceph osd erasure-code-profile ls", "ceph report", "ceph osd crush show-tunables", "ceph-disk list", "ceph versions", "ceph features", "ceph insights", "ceph osd crush dump", "ceph -v", "ceph-volume lvm list", "ceph crash stat", "ceph crash ls", "ceph config log", "ceph config generate-minimal-conf", "ceph config-key dump", ]) ceph_cmds = [ "status", "health detail", "osd tree", "osd stat", "osd df tree", "osd dump", "osd df", "osd perf", "osd blocked-by", "osd pool ls detail", "osd numa-status", "device ls", "mon dump", "mgr dump", "mds stat", "df", "df detail", "fs ls", "fs dump", "pg dump", "pg stat", ] 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") for service in self.services: self.add_journal(units=service) self.add_forbidden_path([ "/etc/ceph/*keyring*", "/var/lib/ceph/*keyring*", "/var/lib/ceph/*/*keyring*", "/var/lib/ceph/*/*/*keyring*", "/var/lib/ceph/osd", "/var/lib/ceph/mon", # Excludes temporary ceph-osd mount location like # /var/lib/ceph/tmp/mnt.XXXX from sos collection. "/var/lib/ceph/tmp/*mnt*", "/etc/ceph/*bindpass*" ]) # vim: set et ts=4 sw=4 :