id 4ddlmZmZddlZGddeeZy))PluginIndependentPluginNc(eZdZdZdZdZdZdZdZy)ElasticzElasticSearch serviceelastic)services) elasticsearchcLd}d} t|5}|D]}tjd|}tjd|}|rUt|j dk(r9|j dj }tj dd|}|st|j dk(s|j dj } ddd||fS#1swY xYw#t$r$}|jd |d |Yd}~||fSd}~wwxYw) N localhost9200z(^network.host):(.*)z(^http.port):(.*)z"|\'zFailed to parse z: ) openresearchlengroupsstripsub Exception _log_info) selfels_config_filehostnameportfreadline network_host network_portes >@A A~ A A L NNJ K K~ Ls; C6B C*C*:#C*C6*C3/C66 D#?DD#c B|jd}|j||jdr|jdn|jd|j|\}}|dz|z}|j d|zd|zd|zd |zd |zd |zd |zgy) Nz$/etc/elasticsearch/elasticsearch.ymlall_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)rrhostrendpoints r"setupz Elastic.setup)s.. 2  ?+ ??: &   9 :   = >++O< d#:$ ;hF9HD88C/(:/(:.9/(:  N) __name__ __module__ __qualname__ short_desc plugin_nameprofilespackagesr#r-r.r"rrs (JKH!H$ r.r)sos.report.pluginsrrrrr6r.r"r8s9 / f'/ r.