Sha256: 1ec9ffc11f1050ec60af347b1b1d443c527e8d2bcdb5d5e014b82e0ae6208944
Contents?: true
Size: 1.18 KB
Versions: 1
Compression:
Stored size: 1.18 KB
Contents
require "vmstat" module AppPerfAgent module Plugin module System class Disk < AppPerfAgent::Plugin::Base def call disks = Vmstat.snapshot.disks disks.flat_map {|disk| [ [ AppPerfAgent::Types::DISK, "system.disk.used_bytes", "#{disk.origin} - #{disk.type} (#{disk.mount})", disk.used_bytes ], [ AppPerfAgent::Types::DISK, "system.disk.free_bytes", "#{disk.origin} - #{disk.type} (#{disk.mount})", disk.free_bytes ], [ AppPerfAgent::Types::DISK, "system.disk.available_bytes", "#{disk.origin} - #{disk.type} (#{disk.mount})", disk.available_bytes ], [ AppPerfAgent::Types::DISK, "system.disk.total_bytes", "#{disk.origin} - #{disk.type} (#{disk.mount})", disk.total_bytes ] ] } end end end end end AppPerfAgent.logger.info "Loading Disk monitoring."
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
app_perf_agent-0.0.2 | lib/app_perf_agent/plugin/system/disk.rb |