Module: ZabbixRubyClient::Plugins::Cpu
- Extended by:
- ZabbixRubyClient::PluginBase, Cpu
- Included in:
- Cpu
- Defined in:
- lib/zabbix-ruby-client/plugins/cpu.rb
Instance Method Summary collapse
Methods included from ZabbixRubyClient::PluginBase
getline, getlines, httprequest, os, perform, time
Instance Method Details
#collect(*args) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/zabbix-ruby-client/plugins/cpu.rb', line 12 def collect(*args) host = args[0] info = get_info back = [] if info info.each do |k,v| back << "#{host} cpu[#{k}] #{time} #{v}" end end back end |