File: //lib/python3/dist-packages/sos/report/plugins/__pycache__/ceph_mon.cpython-312.pyc
�
O6uf�% � �: � d dl Z d dlmZmZmZ G d� deee� Zy)� N)�Plugin�RedHatPlugin�UbuntuPluginc �@ � e Zd ZdZdZdZdZdZdZdZ d� Z
d � Zd
� Zd� Z
y)
�CephMONan
This plugin serves to collect information on monitor nodes within a Ceph
or microceph cluster. It is designed to collect from several versions of
Ceph, including versions that serve as the basis for RHCS 4 and RHCS 5.
Older versions of Ceph will have collections from locations such as
/var/log/ceph, whereas newer versions (as of this plugin's latest update)
will have collections from /var/log/ceph/<fsid>/. This plugin attempts to
account for this where possible across the host's filesystem.
Users may expect to see several collections twice - once in standard output
from the `ceph` command, and again in JSON format. The latter of which will
be placed in the `json_output/` subdirectory within this plugin's directory
in the report archive. These JSON formatted collections are intended to
aid in automated analysis.
zCEPH mon�ceph_mon)�storage�virt� container�ceph)zceph-(.*-)?mon.*)z/var/lib/ceph/mon/*z/var/lib/ceph/*/mon*�%/var/snap/microceph/common/data/mon/*r c � � | j d� }| j � | _ | j j j d� }|sb| j
ddd�� | j g d�� |s| j dg� n| j dg� | j d d
g� nM| j g d�� |s| j dg� n| j d
g� | j ddg� | j dd�� | j g d�� | j d� }|d dk( rQ|d j � D ]; }|j d� s�|j � d }| j d|� �� �= g d�}| j ddd�� | j ddd �� | j | j � D �cg c] }d!|� d"���
c}d�#� | j |D �cg c] }d$|� ��� c}� | j |D �cg c] }d$|� d%���
c}d�#� y c c}w c c}w c c}w )&N�all_logs� microceph� ceph_conf�ceph_mon_log)z.*/ceph.confz$/var/log/ceph/(.*/)?ceph-.*mon.*.log)z/etc/ceph/*keyring*z/var/lib/ceph/**/*keyring*z/var/lib/ceph/**/tmp/*mnt*z/etc/ceph/*bindpass*z/var/log/ceph/**/*ceph-mon*.logz /var/log/ceph/**/*ceph-mon*.log*z/run/ceph/**/ceph-mon*z/var/lib/ceph/**/kv_backend)z'/var/snap/microceph/common/**/*keyring*z(/var/snap/microceph/current/**/*keyring*z./var/snap/microceph/common/data/mon/*/store.dbz"/var/snap/microceph/common/state/*z./var/snap/microceph/common/logs/*ceph-mon*.logz//var/snap/microceph/common/logs/*ceph-mon*.log*r
z"/var/snap/microceph/current/conf/*zceph report�ceph_report)�tags)zceph config dumpz!ceph config generate-minimal-confzceph config log�ceph config-key dumpzceph crash statz
ceph featureszceph health detailz
ceph insightszceph log last 10000 debug auditz!ceph log last 10000 debug clusterz
ceph mgr dumpzceph mgr metadatazceph mgr module lszceph mgr serviceszceph mgr versionsz
ceph mon statzceph osd crush dumpzceph osd crush show-tunablesz!ceph osd crush tree --show-shadowz ceph osd erasure-code-profile lszceph osd metadatazceph quorum_statusz
ceph versionszceph-disk listz
ceph crash ls�statusr �output�*zceph crash info )z device lsz df detail�dfzfs dumpzfs lszmds statzmon dumpzosd blocked-byzosd df treezosd dfzosd dumpzosd numa-statuszosd perfzosd pool autoscale-statuszosd pool ls detailzosd statzpg dumpzpg statr ztime-sync-statusz'ceph health detail --format json-pretty�json_output�ceph_health_detail)�subdirr z"ceph osd tree --format json-pretty�
ceph_osd_treezceph tell mon.z mon_status)r zceph z --format json-pretty)�
get_option�get_ceph_version�ceph_version�policy�package_manager�pkg_by_name�
add_file_tags�add_forbidden_path�
add_copy_spec�add_cmd_output�collect_cmd_output�
splitlines�endswith�split�get_ceph_ids) �selfr �
microceph_pkg�crashes�crashln�cid� ceph_cmds�mid�cmds �=/usr/lib/python3/dist-packages/sos/report/plugins/ceph_mon.py�setupz
CephMON.setup, s� � ��?�?�:�.�� �1�1�3������3�3�?�?��L�
����� +�8F� �
�
�#�#� %�
� ��"�"�5�$� � �"�"�6�$� �
���(�-� �
�
�#�#� %�
� ��"�"�D�$� � �"�"�E�$� �
���7�4� �
�
���M�
��>����
� �<