sniff_2x_1x

in lib/logstash/outputs/amazon_es/http_client/pool.rb [204:227]


    def sniff_2x_1x(nodes)
      nodes.map do |id,info|
        
        
        
        addr_str = info['http_address'].to_s
        next unless addr_str 

        
        
        
        
        attributes = info['attributes']
        next if attributes && attributes['data'] == 'false'

        matches = addr_str.match(ES1_SNIFF_RE_URL) || addr_str.match(ES2_SNIFF_RE_URL)
        if matches
          host = matches[1].empty? ? matches[2] : matches[1]
          port = matches[3]
          ::LogStash::Util::SafeURI.new("#{host}:#{port}")
        end
      end.compact
    end