lib/zabbix-ruby-client/plugins/disk.rb in zabbix-ruby-client-0.0.15 vs lib/zabbix-ruby-client/plugins/disk.rb in zabbix-ruby-client-0.0.16

- old
+ new

@@ -1,10 +1,11 @@ # some doc on # http://www.xaprb.com/blog/2010/01/09/how-linux-iostat-computes-its-results/ # http://www.mjmwired.net/kernel/Documentation/iostats.txt +require "zabbix-ruby-client/logger" -class ZabbixRubyClient +module ZabbixRubyClient module Plugins module Disk extend self def collect(*args) @@ -13,10 +14,10 @@ mapped = args[3] || dev diskspace = `df | grep "#{mapped}"` if $?.to_i == 0 _, size, used, available, percent_used, mount = diskspace.split(/\s+/) else - logger.error "df is not working... ouchie." + Log.error "df is not working... ouchie." return [] end time = Time.now.to_i back = [] back << "#{host} disk.space[#{mapped},size] #{time} #{size.to_i * 1000}"