Module: ZabbixRubyClient::Plugins::Apt

Extended by:
ZabbixRubyClient::PluginBase, Apt
Included in:
Apt
Defined in:
lib/zabbix-ruby-client/plugins/apt.rb

Instance Method Summary collapse

Methods included from ZabbixRubyClient::PluginBase

getline, getlines, httprequest, os, perform, time

Instance Method Details

#collect(*args) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/zabbix-ruby-client/plugins/apt.rb', line 9

def collect(*args)
  host = args[0]
  info = get_info
  if info
    back = []
    back << "#{host} apt[security] #{time} #{info[0]}"
    back << "#{host} apt[pending] #{time} #{info[1]}"
    back << "#{host} apt[status] #{time} TODO apt #{info[0]}/#{info[1]}"
    return back
  else
    return []
  end
end