Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
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

i��d�	�@s.ddlmZmZddlZGdd�dee�ZdS)�)�Plugin�IndependentPluginNc@s,eZdZdZdZdZdZdd�Zdd�Zd	S)
�ElasticzElasticSearch service�elastic)�services)�
elasticsearchc	
Cs�d}d}z[t|��E}|D]:}t�d|�}t�d|�}|r4t|���dkr4|��d��}t�dd|�}q|rFt|���dkrF|��d��}qWd�n
1sQwYW||fSW||fSty}}z|�d	||f�WYd}~||fSd}~ww)
N�	localhost�9200z(^network.host):(.*)z(^http.port):(.*)����z"|\'�zFailed to parse %s: %s)	�open�re�search�len�groups�strip�sub�	Exception�	_log_info)	�self�els_config_file�hostname�port�fread�line�network_host�network_port�e�r�</usr/lib/python3/dist-packages/sos/report/plugins/elastic.py�get_hostname_ports0
�������zElastic.get_hostname_portc
Cs�|�d�}|�|�|�d�r|�d�n|�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 '%s/_cluster/settings?pretty'z'curl -X GET '%s/_cluster/health?pretty'z&curl -X GET '%s/_cluster/stats?pretty'zcurl -X GET '%s/_cat/nodes?v'zcurl -X GET '%s/_cat/indices'zcurl -X GET '%s/_cat/shards'zcurl -X GET '%s/_cat/aliases')�	path_join�
add_copy_spec�
get_optionr!�add_cmd_output)rr�hostr�endpointrrr �setup)s$�



�z
Elastic.setupN)	�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�packagesr!r*rrrr rsr)�sos.report.pluginsrrrrrrrr �<module>s


Spamworldpro Mini