Sha256: e54d55baff0002af1c59908227f6a9afc3abd7d925a4c41e6cd5803ee699dc65
Contents?: true
Size: 1.17 KB
Versions: 84
Compression:
Stored size: 1.17 KB
Contents
# encoding: utf-8 module LogStash module Api module Modules class Stats < ::LogStash::Api::Modules::Base def stats_command factory.build(:stats) end # return hot threads information get "/jvm/hot_threads" do top_threads_count = params["threads"] || 3 ignore_idle_threads = params["ignore_idle_threads"] || true options = { :threads => top_threads_count.to_i, :ignore_idle_threads => as_boolean(ignore_idle_threads) } respond_with(stats_command.hot_threads(options)) end # return hot threads information get "/jvm/memory" do respond_with({ :memory => stats_command.memory }) end get "/?:filter?" do payload = { :events => stats_command.events, :jvm => { :timestamp => stats_command.started_at, :uptime_in_millis => stats_command.uptime, :memory => stats_command.memory, }, :os => stats_command.os } respond_with(payload, {:filter => params["filter"]}) end end end end end
Version data entries
84 entries across 81 versions & 8 rubygems