Sha256: a5109cc4b4e0577f727f11714764013620396c5ec8b3f2ec21d3f205bff9d4be

Contents?: true

Size: 834 Bytes

Versions: 1

Compression:

Stored size: 834 Bytes

Contents

require "vmstat"

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.2 lib/app_perf_agent/plugin/system/load.rb