Class: NewRelicOpenvpnAgent::Agent

Inherits:
NewRelic::Plugin::Agent::Base
  • Object
show all
Defined in:
lib/newrelic_pivpn_agent.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#identObject (readonly)

Returns the value of attribute ident.



18
19
20
# File 'lib/newrelic_pivpn_agent.rb', line 18

def ident
  @ident
end

Instance Method Details

#poll_cycleObject



20
21
22
23
24
25
# File 'lib/newrelic_pivpn_agent.rb', line 20

def poll_cycle
  [:total_users, :total_bytes_received, :total_bytes_sent, :average_bytes_received, :average_bytes_sent].each do |_type|
	name, unit, _output = metric(_type)
    report_metric name, unit, _output.call
  end
end