Module: ZabbixRubyClient::Plugins::Load
Instance Method Summary
collapse
getline, httprequest, perform
Instance Method Details
#collect(*args) ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/zabbix-ruby-client/plugins/load.rb', line 11
def collect(*args)
host = args[0]
info = get_info
if info
time = Time.now.to_i
back = []
back << "#{host} load[one] #{time} #{info[0]}"
back << "#{host} load[five] #{time} #{info[1]}"
back << "#{host} load[fifteen] #{time} #{info[2]}"
back << "#{host} load[procs] #{time} #{info[3]}"
return back
else
return []
end
end
|