Sha256: 926333151f8762262e7bb1ee4a72bce3f8ad548cccac7a64999da701128b7a49

Contents?: true

Size: 845 Bytes

Versions: 13

Compression:

Stored size: 845 Bytes

Contents

# encoding: utf-8
require "logstash/api/modules/base"

module LogStash
  module Api
    module Modules
      class Node < ::LogStash::Api::Modules::Base
        def node
          factory.build(:node)
        end

        get "/hot_threads" do
          ignore_idle_threads = params["ignore_idle_threads"] || true

          options = {
            :ignore_idle_threads => as_boolean(ignore_idle_threads),
            :human => human?
          }
          options[:threads] = params["threads"].to_i if params.has_key?("threads")

          as = options[:human] ? :string : :json
          respond_with(node.hot_threads(options), {:as => as})
        end

        get "/?:filter?" do
          selected_fields = extract_fields(params["filter"].to_s.strip)
          respond_with node.all(selected_fields)
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
logstash-filter-delta-1.1.0 vendor/bundle/jruby/2.2.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/lib/logstash/api/modules/node.rb
logstash-filter-delta-1.0.1 vendor/bundle/jruby/2.2.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/lib/logstash/api/modules/node.rb
logstash-filter-base64-1.0.4 vendor/bundle/jruby/2.2.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/lib/logstash/api/modules/node.rb
logstash-filter-base64-1.0.3 vendor/bundle/jruby/2.2.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/lib/logstash/api/modules/node.rb
logstash-filter-delta-1.0.0 vendor/bundle/jruby/2.2.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/lib/logstash/api/modules/node.rb
logstash-filter-base64-1.0.2 vendor/bundle/jruby/2.3.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/lib/logstash/api/modules/node.rb
logstash-filter-base64-1.0.1 vendor/bundle/jruby/2.3.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/lib/logstash/api/modules/node.rb
logstash-filter-base64-1.0.0 vendor/bundle/jruby/2.3.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/lib/logstash/api/modules/node.rb
logstash-core-5.0.0.alpha6.snapshot5-java lib/logstash/api/modules/node.rb
logstash-core-5.0.0.alpha6.snapshot4-java lib/logstash/api/modules/node.rb
logstash-core-5.0.0.alpha6.snapshot3-java lib/logstash/api/modules/node.rb
logstash-core-5.0.0.alpha6.snapshot2-java lib/logstash/api/modules/node.rb
logstash-core-5.0.0.alpha6.snapshot1-java lib/logstash/api/modules/node.rb