HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3.9/site-packages/sos/report/plugins/__pycache__/ceph_mgr.cpython-39.pyc
a

^��cJ�@s4ddlZddlmZmZmZGdd�deee�ZdS)�N)�Plugin�RedHatPlugin�UbuntuPluginc@s4eZdZdZdZdZdZdZdZdd�Z	d	d
�Z
dS)�CephMGRa�
    This plugin is for capturing information from Ceph mgr nodes. While the
    majority of this plugin should be version-agnostic, several collections are
    dependent upon the version of Ceph installed. Versions that correlate to
    RHCS 4 or RHCS 5 are explicitly handled for differences such as those
    pertaining to log locations on the host filesystem.

    Note that while this plugin will activate based on the presence of Ceph
    containers, commands are run directly on the host as those containers are
    often not configured to successfully run the `ceph` commands collected by
    this plugin. These commands are majorily `ceph daemon` commands that will
    reference discovered admin sockets under /var/run/ceph.
    zCEPH mgrZceph_mgr)ZstorageZvirt�	container)z/var/lib/ceph/mgr/z/var/lib/ceph/*/mgr*)zceph-(.*-)?mgr.*cs`|�ddi�|�gd��|�gd��|�gd��gd��|��fdd�|��D��dS)	Nz"/var/log/ceph/(.*/)?ceph-mgr.*.logZceph_mgr_log)z/etc/ceph/*keyring*z/var/lib/ceph/**/*keyring*z/var/lib/ceph/**/osd*z/var/lib/ceph/**/mon*z/var/lib/ceph/**/tmp/*mnt*z/etc/ceph/*bindpass*)z/var/log/ceph/**/ceph-mgr*.logz/var/lib/ceph/**/mgr*z/var/lib/ceph/**/bootstrap-mgr/z/run/ceph/**/ceph-mgr*)zceph balancer statuszceph orch host lszceph orch device lszceph orch ls --exportzceph orch pszceph orch status --detailzceph orch upgrade statuszceph log last cephadm)zconfig diffzconfig showZ
dump_cacheZ
dump_mempoolsZdump_osd_network�mds_requests�mds_sessionsZobjecter_requestsrrz	perf dumpzperf histogram dumpzperf histogram schemazperf schema�status�versioncs&g|]}�D]}d|�d|���qqS)zceph daemon � �)�.0�m�cmd�Zcmdsr�?/usr/lib/python3.9/site-packages/sos/report/plugins/ceph_mgr.py�
<listcomp>[sz!CephMGR.setup.<locals>.<listcomp>)Z
add_file_tagsZadd_forbidden_pathZ
add_copy_specZadd_cmd_output�	get_socks)�selfrrr�setup$s��z
CephMGR.setupcCsNg}t�d�D]:\}}}|D]*}|�d�r|�d�r|�|�||��qq|S)z�
        Find any available admin sockets under /var/run/ceph (or subdirs for
        later versions of Ceph) which can be used for ceph daemon commands
        z/var/run/ceph/zceph-mgrz.asok)�os�walk�
startswith�endswith�appendZ	path_join)rZceph_socketsZrdir�dirs�files�filerrrr_szCephMGR.get_socksN)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesrZ
containersrrrrrrrs;r)rZsos.report.pluginsrrrrrrrr�<module>	s