Sha256: 3d509e7ad8cf9dc7898cbbc266b059209e2832852a6e278015211738f89c3df5
Contents?: true
Size: 745 Bytes
Versions: 1
Compression:
Stored size: 745 Bytes
Contents
require "vmstat" require_relative "../base" module AppPerfAgent module Plugin module System class Network < AppPerfAgent::Plugin::Base def call inets = Vmstat.ethernet_devices inets.flat_map {|inet| [ [ AppPerfAgent::Types::NETWORK, "system.network.in_bytes", inet.name.to_s, inet.in_bytes ], [ AppPerfAgent::Types::NETWORK, "system.network.out_bytes", inet.name.to_s, inet.out_bytes ] ] } end end end end end AppPerfAgent.logger.info "Loading Network monitoring."
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
app_perf_agent-0.0.4 | lib/app_perf_agent/plugin/system/network.rb |