Sha256: 813e50cbc54e30e5253058b4d5178659090a5c12fbd3380f7d57b55478a4a98e

Contents?: true

Size: 861 Bytes

Versions: 1

Compression:

Stored size: 861 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.4 lib/app_perf_agent/plugin/system/load.rb