Socket
Book a DemoInstallSign in
Socket

misfo-aws-sdk-cloudwatch

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

misfo-aws-sdk-cloudwatch

0.0.4.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

= AWS SDK for Ruby -- CloudWatch API support

This gem adds rudimentary support for the CloudWatch API to the official AWS SDK for Ruby.

== SYNOPSIS

require 'aws/cloud_watch'

cw = AWS::CloudWatch.new

all low-level API methods are supported, eg.

cw.client.get_metric_statistics :start_time => Time.utc(2012, 5, 1).iso8601, :end_time => Time.utc(2012, 5, 7).iso8601, :namespace => 'AWS/EC2', :period => 246060, :statistics => ['Average'], :metric_name => 'CPUUtilization', :dimensions => [{ :name => 'InstanceId', :value => 'i-ecb73258' }] cw.client.list_metrics :namespace => 'AWS/EC2'

There is currently only some high level access to EC2 metrics:

require 'aws/cloud_watch/ec2'

ec2 = AWS::EC2.new

instance = ec2.instances['i-ecb73258']

instance.metrics instance.metrics['CPUUtilization'].get :average, 246060, Time.utc(2012, 5, 20)..Time.utc(2012, 5, 21)

there are some shortcuts:

instance.cpu_utilization.get :average, 246060, Time.utc(2012, 5, 20)..Time.utc(2012, 5, 21) instance.cpu_utilization.get :average, 246060, Time.utc(2012, 5, 21) # takes a single period instance.cpu_utilization.average 246060, Time.utc(2012, 5, 21) instance.cpu_utilization 246060, Time.utc(2012, 5, 21) # CPU utilization is averaged by default, others are summed instance.cpu_utilization 246060 # returns average CPU utilization for the last 24 hours

or, if you require 'active_support/core_ext'

instance.cpu_utilization 1.day

Note that variants without a time range return value directly.

FAQs

Package last updated on 16 Jul 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.