HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/lib/python3/dist-packages/sos/report/plugins/__pycache__/ceph_osd.cpython-38.pyc
U

i��d��@s4ddlZddlmZmZmZGdd�deee�ZdS)�N)�Plugin�RedHatPlugin�UbuntuPluginc@s4eZdZdZdZdZdZdZdZdd�Z	d	d
�Z
dS)�CephOSDa�
    This plugin is for capturing information from Ceph OSD nodes. While the
    majority of this plugin should be version agnotics, 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 osdZceph_osd)ZstorageZvirtZ	containerZceph)zceph-(.*-)?osd.*)z/var/lib/ceph/osd/*z/var/lib/ceph/*/osd*�%/var/snap/microceph/common/data/osd/*cs�|jj�d�}|s�|�ddi�|�ddddg�|�dd	d
dg�|�dd
g�ddddddddddddddddddd d!g�|��fd"d#�|��D��n|�d$d%d&g�|�d'd(g�dS))NZ	microcephz(/var/log/ceph/(.*/)?ceph-(.*-)?osd.*.logZceph_osd_logz/etc/ceph/*keyring*z/var/lib/ceph/**/*keyring*z/var/lib/ceph/**/tmp/*mnt*z/etc/ceph/*bindpass*z/run/ceph/**/ceph-osd*z/var/lib/ceph/**/kv_backendz/var/log/ceph/**/ceph-osd*.logz!/var/log/ceph/**/ceph-volume*.logzceph-disk listzceph-volume lvm listzbluestore bluefs availablezconfig diffzconfig showZdump_blacklistZdump_blocked_opsZdump_historic_ops_by_durationZdump_historic_slow_opsZ
dump_mempoolsZdump_ops_in_flightZdump_op_pq_stateZdump_osd_networkZdump_reservationsZ
dump_watcherszlog dumpz	perf dumpzperf histogram dumpZobjecter_requestsZopsZstatus�versioncs&g|]}�D]}d|�d|���qqS)zceph daemon � �)�.0�i�c�Zcmdsr	�=/usr/lib/python3/dist-packages/sos/report/plugins/ceph_osd.py�
<listcomp>Zsz!CephOSD.setup.<locals>.<listcomp>z'/var/snap/microceph/common/**/*keyring*z(/var/snap/microceph/current/**/*keyring*z"/var/snap/microceph/common/state/*rz./var/snap/microceph/common/logs/*ceph-osd*.log)ZpolicyZpackage_managerZpkg_by_nameZ
add_file_tagsZadd_forbidden_pathZ
add_copy_specZadd_cmd_output�	get_socks)�selfZ
microceph_pkgr	r
r�setup%sn��
������z
CephOSD.setupcCsDg}t�d�D]0\}}}|D] }|�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/z.asok)�os�walk�endswith�appendZ	path_join)rZceph_socketsZrdir�dirs�files�filer	r	rrjs
zCephOSD.get_socksN)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesZ
containersrrrr	r	r	rrsEr)rZsos.report.pluginsrrrrr	r	r	r�<module>	s