HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/elastic.cpython-36.pyc
3

3��d�	�@s.ddlmZmZddlZGdd�dee�ZdS)�)�Plugin�IndependentPluginNc@s,eZdZdZdZd
ZdZdd�Zdd�Zd	S)�ElasticzElasticSearch serviceZelastic�services�
elasticsearchc	Cs�d}d}y�t|���}x||D]t}tjd|�}tjd|�}|rjt|j��dkrj|j�d
j�}tjdd|�}q|rt|j��dkr|j�dj�}qWWdQRXWn4tk
r�}z|jd	||f�WYdd}~XnX||fS)NZ	localhostZ9200z(^network.host):(.*)z(^http.port):(.*)��z"|\'�zFailed to parse %s: %s���r
)	�open�re�search�len�groups�strip�sub�	ExceptionZ	_log_info)	�self�els_config_fileZhostname�portZfread�lineZnetwork_hostZnetwork_port�e�r�/usr/lib/python3.6/elastic.py�get_hostname_ports 

"$zElastic.get_hostname_portc	Cs�|jd�}|j|�|jd�r*|jd�n
|jd�|j|�\}}|d|}|jd|d|d|d	|d
|d|d|g�dS)
Nz$/etc/elasticsearch/elasticsearch.ymlZall_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')Z	path_joinZ
add_copy_specZ
get_optionrZadd_cmd_output)rr�hostrZendpointrrr�setup)s 


z
Elastic.setupN)r)r)	�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesZpackagesrrrrrrrsr)Zsos.report.pluginsrrrrrrrr�<module>s