https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/elastic.cpython-310.pyc
o

-�_g�	�@s.ddlZddlmZmZGdd�dee�ZdS)�N)�Plugin�IndependentPluginc@s,eZdZdZdZdZdZdd�Zdd�Zd	S)
�ElasticzElasticSearch service�elastic)�services)�
elasticsearchc	
Csd}d}z]t|dd��E}|D]:}t�d|�}t�d|�}|r6t|���dkr6|��d��}t�d	d
|�}q|rHt|���dkrH|��d��}qWd�n
1sSwYW||fSW||fSty�}z|�d|�d
|���WYd}~||fSd}~ww)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�els_config_file�hostname�port�fread�line�network_host�network_port�err�r �</usr/lib/python3/dist-packages/sos/report/plugins/elastic.py�get_hostname_ports0����� ��zElastic.get_hostname_portcCs�|�d�}|�|�|�d�r|�d�n|�d�|�|�\}}|d|}|�d|�d�d|�d�d|�d	�d|�d
�d|�d�d|�d�d|�d
�g�dS)Nz$/etc/elasticsearch/elasticsearch.yml�all_logsz/var/log/elasticsearch/*z/var/log/elasticsearch/*.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)rr�hostr�endpointr r r!�setup*s$�










�z
Elastic.setupN)	�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�packagesr"r+r r r r!rsr)r�sos.report.pluginsrrrr r r r!�<module>s


https://t.me/RX1948 - 2025