Class: Pimon::Probe::SwapUsage

Inherits:
Object
  • Object
show all
Defined in:
lib/pimon/probe/swap_usage.rb

Class Method Summary collapse

Class Method Details

.check(date = Time.now) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/pimon/probe/swap_usage.rb', line 4

def self.check(date = Time.now)
  options = {
    date: date.strftime('%Y-%m-%d %H:%M:%S'),
    probe_name: 'swap',
    value: SystemMemory.check(:swap),
    unit: unit
  }
  OpenStruct.new(options)
end

.unitObject



14
15
16
# File 'lib/pimon/probe/swap_usage.rb', line 14

def self.unit
  '%'
end