관리-도구
편집 파일: elastic.pyo
� u��ec @ sQ d d l m Z m Z m Z m Z d d l Z d e e e e f d � � YZ d S( i����( t Plugint RedHatPlugint DebianPlugint UbuntuPluginNt Elasticc B s2 e Z d Z d Z d Z d Z d � Z d � Z RS( s ElasticSearch service t elastict servicest elasticsearchc C s d } d } y� t | � �� } x� | D]� } t j d | � } t j d | � } | r� t | j � � d k r� | j � d j � } t j d d | � } q% n | r% t | j � � d k r% | j � d j � } q% q% WWd QXWn* t k r} | j d | | f � n X| | f S( Nt localhostt 9200s (^network.host):(.*)s (^http.port):(.*)i i����s "|\'t s Failed to parse %s: %s( t opent ret searcht lent groupst stript subt Exceptiont _log_info( t selft els_config_filet hostnamet portt freadt linet network_hostt network_portt e( ( s7 /usr/lib/python2.7/site-packages/sos/plugins/elastic.pyt get_hostname_port s 'c C s� d } | j | � | j d � r2 | j d � n | j d � | j | � \ } } | d | } | j d | d | d | d | g � d S( Ns$ /etc/elasticsearch/elasticsearch.ymlt all_logss /var/log/elasticsearch/*s( /var/log/elasticsearch/elasticsearch.logt :s) curl -X GET '%s/_cluster/settings?pretty's'