Class: Monittr::Services::System
Overview
A “system” service in Monit
<service type=“5”>
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
-
#initialize(xml) ⇒ System
constructor
A new instance of System.
Methods inherited from Base
Constructor Details
#initialize(xml) ⇒ System
Returns a new instance of System.
91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/monittr.rb', line 91 def initialize(xml) @xml = xml super( { :name => value('name' ), :status => value('status', :to_i), :monitored => value('monitor', :to_i), :load => value('system/load/avg01', :to_f), :cpu => value('system/cpu/user', :to_f), :memory => value('system/memory/percent', :to_f), :swap => value('system/swap/percent', :to_f), :uptime => value('//server/uptime', :to_i) } ) end |