Class: Monittr::Services::Filesystem
- Defined in:
- lib/monittr.rb
Overview
A “filesystem” service in Monit
mmonit.com/monit/documentation/monit.html#filesystem_flags_testing
<service type=“0”>
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
-
#initialize(xml) ⇒ Filesystem
constructor
A new instance of Filesystem.
Methods inherited from Base
Constructor Details
#initialize(xml) ⇒ Filesystem
Returns a new instance of Filesystem.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/monittr.rb', line 112 def initialize(xml) @xml = xml super( { :name => value('name' ), :status => value('status', :to_i), :monitored => value('monitor', :to_i), :percent => value('block/percent', :to_f), :usage => value('block/usage' ), :total => value('block/total' ) } ) rescue Exception => e puts "ERROR: #{e.class} -- #{e.}, In: #{e.backtrace.first}" super( { :name => 'Error', :status => 3, :message => e. } ) end |