Class: LogStash::Instrument::PeriodicPoller::JVM
- Defined in:
- lib/logstash/instrument/periodic_poller/jvm.rb
Defined Under Namespace
Classes: GarbageCollectorName
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#metric ⇒ Object
readonly
Returns the value of attribute metric.
Instance Method Summary collapse
- #collect ⇒ Object
-
#initialize(metric, options = {}) ⇒ JVM
constructor
A new instance of JVM.
Methods inherited from Base
Methods included from Util::Loggable
included, #logger, #slow_logger
Constructor Details
#initialize(metric, options = {}) ⇒ JVM
Returns a new instance of JVM.
40 41 42 43 |
# File 'lib/logstash/instrument/periodic_poller/jvm.rb', line 40 def initialize(metric, = {}) super(metric, ) @load_average = LoadAverage.create end |
Instance Attribute Details
#metric ⇒ Object (readonly)
Returns the value of attribute metric.
38 39 40 |
# File 'lib/logstash/instrument/periodic_poller/jvm.rb', line 38 def metric @metric end |
Instance Method Details
#collect ⇒ Object
45 46 47 48 49 50 51 52 53 |
# File 'lib/logstash/instrument/periodic_poller/jvm.rb', line 45 def collect raw = JRMonitor.memory.generate collect_jvm_metrics(raw) collect_pools_metrics(raw) collect_threads_metrics collect_process_metrics collect_gc_stats collect_load_average end |