lib/zabbix-ruby-client/plugins/load.rb in zabbix-ruby-client-0.0.15 vs lib/zabbix-ruby-client/plugins/load.rb in zabbix-ruby-client-0.0.16
- old
+ new
@@ -1,9 +1,10 @@
# for more info check
# http://juliano.info/en/Blog:Memory_Leak/Understanding_the_Linux_load_average
+require "zabbix-ruby-client/logger"
-class ZabbixRubyClient
+module ZabbixRubyClient
module Plugins
module Load
extend self
def collect(*args)
@@ -11,10 +12,10 @@
#cpuinfo = `mpstat | grep " all "`
cpuinfo = `cat /proc/loadavg`
if $?.to_i == 0
one, five, fifteen, procs_t = cpuinfo.split(/\s+/)
else
- logger.warn "Oh you don't have a /proc ?"
+ Log.warn "Oh you don't have a /proc ?"
return []
end
procs, _ = procs_t.split(/\//)