Sha256: 4f00c63d53def4e56b88dfa88777668c526dd2fb480150c753a08aa7a47c3853

Contents?: true

Size: 497 Bytes

Versions: 1

Compression:

Stored size: 497 Bytes

Contents

# encoding: utf-8

require "logstash/api/commands/base"

module LogStash
  module Api
    module Commands
      class DefaultMetadata < Commands::Base
        def all
          {:host => host, :version => version, :http_address => http_address}
        end
        
        def host
          Socket.gethostname
        end

        def version
          LOGSTASH_CORE_VERSION
        end

        def http_address
          service.agent.webserver.address
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
logstash-core-5.0.0.alpha5.snapshot1-java lib/logstash/api/commands/default_metadata.rb