NineSec Team Shell
Server IP : 184.107.3.203  /  Your IP : 216.73.216.51
Web Server : Apache
System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64
User : adminteladeoro ( 1015)
PHP Version : 8.2.28
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/ceph_osd.cpython-36.pyc
3

~�g�@s4ddlZddlmZmZmZGdd�deee�ZdS)�N)�Plugin�RedHatPlugin�UbuntuPluginc@s4eZdZdZdZdZdZdZdZdd
�Z	dd�Z
dS)�CephOSDa�
    This plugin is for capturing information from Ceph OSD 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 majorly `ceph daemon` commands that will
    reference discovered admin sockets under /var/run/ceph.
    zCEPH osdZceph_osd�storage�virt�	container�ceph�ceph-(.*-)?osd.*�/var/lib/ceph/osd/*�/var/lib/ceph/*/osd*�%/var/snap/microceph/common/data/osd/*c s|jd�}d}|jjjd�}dddddd	d
ddd
ddddddddddddddddddd d!d"d#g �|s�d$}|jd%d&i�|jd'd(d)d*g�|jd+d,d-d.g�|jd/d0g�|r�|jd1d2g�n2d3}|jd4d5d6g�|jd7d8g�|r�|jd9g�|j�fd:d;�|j|�D��dS)<N�all_logs�Z	microcephzbluestore bluefs availableZdump_reservationszbluefs statszbluestore allocator dump blockzbluestore bluefs device infozconfig diffzconfig showzcounter dumpzcounter schemaZdump_blocked_opsZdump_blocklistZdump_historic_ops_by_durationZdump_historic_slow_opsZ
dump_mempoolsZdump_op_pq_stateZdump_ops_in_flightZdump_osd_networkZdump_pgstate_historyZdump_recovery_reservationsZdump_scrubsZ
dump_watchersZget_mapped_poolsZlist_devicesZlist_unfoundzlog dumpZobjecter_requestsZopsz	perf dumpzperf histogram dumpzperf schemaZstatus�versionz
/var/run/cephz(/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 listz/var/log/ceph/**/ceph-osd*.log*z"/var/log/ceph/**/ceph-volume*.log*z/var/snap/microceph/current/runz'/var/snap/microceph/common/**/*keyring*z(/var/snap/microceph/current/**/*keyring*z"/var/snap/microceph/common/state/*z%/var/snap/microceph/common/data/osd/*z./var/snap/microceph/common/logs/*ceph-osd*.logz//var/snap/microceph/common/logs/*ceph-osd*.log*cs&g|]}�D]}d|�d|���qqS)zceph daemon � �)�.0�i�c)�cmdsr�/usr/lib/python3.6/ceph_osd.py�
<listcomp>�sz!CephOSD.setup.<locals>.<listcomp>)	Z
get_optionZpolicyZpackage_managerZpkg_by_nameZ
add_file_tagsZadd_forbidden_pathZ
add_copy_specZadd_cmd_output�	get_socks)�selfr�	directoryZ
microceph_pkgr)rr�setup's�



z
CephOSD.setupcCsTg}xJtj|�D]<\}}}x0|D](}|jd�r d|kr |j|j||��q WqW|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.asokZosd)�os�walk�endswith�appendZ	path_join)rrZceph_socketsZrdir�_�files�filerrrr�s
zCephOSD.get_socksN)rrrr	)r
)rrr
)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesZ
containersr"rrrrrrrs
dr)rZsos.report.pluginsrrrrrrrr�<module>s

NineSec Team - 2022