| Server IP : 173.209.174.21 / Your IP : 216.73.216.79 Web Server : Apache/2.4.58 (Ubuntu) System : Linux wcfs-server 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64 User : nodor ( 1000) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/sos/report/plugins/__pycache__/ |
Upload File : |
�
G%@iA
� �4 � d dl Z d dlmZmZ G d� dee� Zy)� N)�Plugin�IndependentPluginc �, � e Zd ZdZdZdZdZdZd� Zd� Z y)�
OpenSearchzOpenSearch service�
opensearch)�services)r c �P � d}d} t |d�� 5 }|D ]� }t j d|� }t j d|� }|rUt |j � � dk( r9|j � d j � }t j d d
|� }��|s��t |j � � dk( s��|j � d j � }�� ddd� ||fS # 1 sw Y �
xY w# t $ r$}| j d|� d
|� �� Y d}~||fS d}~ww xY w)z Get hostname and port number � localhost�9200zUTF-8)�encodingz(^network.host):(.*)z(^http.port):(.*)� ���z"|\'� NzFailed to parse z: ) �open�re�search�len�groups�strip�sub� Exception� _log_info) �self�opensearch_config_file�hostname�port�fread�line�network_host�network_port�errs �?/usr/lib/python3/dist-packages/sos/report/plugins/opensearch.py�get_hostname_portzOpenSearch.get_hostname_port s0 � ����� O��,�w�?�
A�5�!� A�D�#%�9�9�-D�d�#K�L�#%�9�9�-A�4�#H�L�#��L�,?�,?�,A�(B�a�(G�#/�#6�#6�#8��#<�#B�#B�#D��#%�6�6�'�2�x�#@�� �#��L�,?�,?�,A�(B�a�(G�+�2�2�4�R�8�>�>�@��A�
A� ��~��
A�
A�� � O��N�N�-�.D�-E�R��u�M�N�N���~��� O�s; �
C8 �BC,�C,�<#C,� C8 �,C5�1C8 �8 D%�D � D%c �P � | j d� }| j |� | j d� r| j d� n| j d� | j |� \ }}|dz |z }| j d|� d�d|� d�d|� d �d|� d
�d|� d�d|� d�d|� d
�g� y )Nz/etc/opensearch/opensearch.yml�all_logsz/var/log/opensearch/*z/var/log/opensearch/*.log�:z
curl -X GET 'z/_cluster/settings?pretty'z/_cluster/health?pretty'z/_cluster/stats?pretty'z/_cat/nodes?v'z/_cat/indices'z
/_cat/shards'z/_cat/aliases')� path_join�
add_copy_spec�
get_optionr# �add_cmd_output)r r �hostr �endpoints r"