Module: ZabbixRubyClient::Plugins::Load
- Extended by:
- ZabbixRubyClient::PluginBase, Load
- Included in:
- Load
- Defined in:
- lib/zabbix-ruby-client/plugins/load.rb
Instance Method Summary collapse
Methods included from ZabbixRubyClient::PluginBase
getline, getlines, 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 |