Class: LogStash::Instrument::PeriodicPoller::LoadAverage::Other

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/instrument/periodic_poller/load_average.rb

Class Method Summary collapse

Class Method Details

.getObject



26
27
28
29
30
31
32
33
34
# File 'lib/logstash/instrument/periodic_poller/load_average.rb', line 26

def self.get()
  load_average_1m = ManagementFactory.getOperatingSystemMXBean().getSystemLoadAverage()

  return nil if load_average_1m.nil?

  {
    :"1m" => load_average_1m
  }
end