Sha256: dc9658fe49c253597ca28a0ed205da9eb753001d428b09cfa19c32e626e793c4

Contents?: true

Size: 858 Bytes

Versions: 1

Compression:

Stored size: 858 Bytes

Contents

require "vmstat"
require_relative "base"

module AppPerfAgent
  module Plugin
    module System
      class Load < AppPerfAgent::Plugin::Base
        def call
          loads = Vmstat.load_average
          [
            [
              AppPerfAgent::Types::LOAD,
              "system.load.one_minute",
              "Load - One Minute",
              loads.one_minute
            ],
            [
              AppPerfAgent::Types::LOAD,
              "system.load.five_minute",
              "Load - Five Minute",
              loads.five_minutes
            ],
            [
              AppPerfAgent::Types::LOAD,
              "system.load.fifteen_minute",
              "Load - Fifteen Minute",
              loads.fifteen_minutes
            ]
          ]
        end
      end
    end
  end
end

AppPerfAgent.logger.info "Loading Load monitoring."

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
app_perf_agent-0.0.3 lib/app_perf_agent/plugin/system/load.rb