Module: ZabbixRubyClient::Plugins::Ovpn
- Extended by:
- ZabbixRubyClient::PluginBase, Ovpn
- Included in:
- Ovpn
- Defined in:
- lib/zabbix-ruby-client/plugins/ovpn.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 |
# File 'lib/zabbix-ruby-client/plugins/ovpn.rb', line 11 def collect(*args) host = args[0] ovpnfile = args[1] info = get_info(ovpnfile) back = [] if info time = Time.now.to_i back << "#{host} ovpn[received] #{time} #{info['received']}" back << "#{host} ovpn[sent] #{time} #{info['sent']}" back << "#{host} ovpn[count] #{time} #{info['count']}" end back end |