Sha256: 4179c7ca38f71831bbf907ae35a1d21a72143551715c7cecde6dfbd3c543e233
Contents?: true
Size: 1.13 KB
Versions: 14
Compression:
Stored size: 1.13 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 } } respond_with(payload, {:filter => params["filter"]}) end end end end end
Version data entries
14 entries across 14 versions & 3 rubygems