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



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

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

  return nil if load_average_1m.nil?

  {
    :"1m" => load_average_1m
  }
end