Zend Framework  1.12
Public Member Functions | Protected Attributes | List of all members
Zend_Service_Amazon_Ec2_CloudWatch Class Reference

Public Member Functions

 getMetricStatistics (array $options)
 Returns data for one or more statistics of given a metric.
 
 listMetrics ($nextToken=null)
 Return the Metrics that are aviable for your current monitored instances.
 
- Public Member Functions inherited from Zend_Service_Amazon_Ec2_Abstract
 __construct ($accessKey=null, $secretKey=null, $region=null)
 Create Amazon client.
 
- Public Member Functions inherited from Zend_Service_Amazon_Abstract
 __construct ($accessKey=null, $secretKey=null)
 Create Amazon client.
 

Protected Attributes

 $_ec2Endpoint = 'monitoring.amazonaws.com'
 The HTTP query server.
 
 $_ec2ApiVersion = '2009-05-15'
 The API version to use.
 
 $_xmlNamespace = 'http://monitoring.amazonaws.com/doc/2009-05-15/'
 XML Namespace for the CloudWatch Stuff.
 
 $_validMetrics
 
 $_validStatistics = array('Average', 'Maximum', 'Minimum', 'Samples', 'Sum')
 
 $_validDimensionsKeys
 
- Protected Attributes inherited from Zend_Service_Amazon_Ec2_Abstract
 $_ec2Endpoint = 'ec2.amazonaws.com'
 The HTTP query server.
 
 $_ec2ApiVersion = '2009-04-04'
 The API version to use.
 
 $_ec2SignatureVersion = '2'
 Signature Version.
 
 $_ec2SignatureMethod = 'HmacSHA256'
 Signature Encoding Method.
 
 $_httpTimeout = 10
 Period after which HTTP request will timeout in seconds.
 
 $_region
 
- Protected Attributes inherited from Zend_Service_Amazon_Abstract
 $_secretKey
 
 $_accessKey
 

Additional Inherited Members

- Static Public Member Functions inherited from Zend_Service_Amazon_Ec2_Abstract
static setRegion ($region)
 Set which region you are working in.
 
- Protected Member Functions inherited from Zend_Service_Amazon_Ec2_Abstract
 _getRegion ()
 Method to fetch the AWS Region.
 
 sendRequest (array $params=array())
 Sends a HTTP request to the queue service using Zend_Http_Client.
 
 addRequiredParameters (array $parameters)
 Adds required authentication and version parameters to an array of parameters.
 
 signParameters (array $paramaters)
 Computes the RFC 2104-compliant HMAC signature for request parameters.
 
- Static Protected Attributes inherited from Zend_Service_Amazon_Ec2_Abstract
static $_defaultRegion = null
 
static $_validEc2Regions = array('eu-west-1', 'us-east-1')
 

Member Function Documentation

getMetricStatistics ( array  $options)

Returns data for one or more statistics of given a metric.

Note: The maximum number of datapoints that the Amazon CloudWatch service will return in a single GetMetricStatistics request is 1,440. If a request is made that would generate more datapoints than this amount, Amazon CloudWatch will return an error. You can alter your request by narrowing the time range (StartTime, EndTime) or increasing the Period in your single request. You may also get all of the data at the granularity you originally asked for by making multiple requests with adjacent time ranges.

Parameters
array$optionsThe options you want to get statistics for: ** Required ** MeasureName: The measure name that corresponds to the measure for the gathered metric. Valid EC2 Values are CPUUtilization, NetworkIn, NetworkOut, DiskWriteOps DiskReadBytes, DiskReadOps, DiskWriteBytes. Valid Elastic Load Balancing Metrics are Latency, RequestCount, HealthyHostCount UnHealthyHostCount Statistics: The statistics to be returned for the given metric. Valid values are Average, Maximum, Minimum, Samples, Sum. You can specify this as a string or as an array of values. If you don't specify one it will default to Average instead of failing out. If you specify an incorrect option it will just skip it. ** Optional ** Dimensions: Amazon CloudWatch allows you to specify one Dimension to further filter metric data on. If you don't specify a dimension, the service returns the aggregate of all the measures with the given measure name and time range. Unit: The standard unit of Measurement for a given Measure. Valid Values: Seconds, Percent, Bytes, Bits, Count, Bytes/Second, Bits/Second, Count/Second, and None Constraints: When using count/second as the unit, you should use Sum as the statistic instead of Average. Otherwise, the sample returns as equal to the number of requests instead of the number of 60-second intervals. This will cause the Average to always equals one when the unit is count/second. StartTime: The timestamp of the first datapoint to return, inclusive. For example, 2008-02-26T19:00:00+00:00. We round your value down to the nearest minute. You can set your start time for more than two weeks in the past. However, you will only get data for the past two weeks. (in ISO 8601 format) Constraints: Must be before EndTime EndTime: The timestamp to use for determining the last datapoint to return. This is the last datapoint to fetch, exclusive. For example, 2008-02-26T20:00:00+00:00. (in ISO 8601 format)
listMetrics (   $nextToken = null)

Return the Metrics that are aviable for your current monitored instances.

Parameters
string$nextTokenThe NextToken parameter is an optional parameter that allows you to retrieve the next set of results for your ListMetrics query.
Returns
array

Member Data Documentation

$_ec2ApiVersion = '2009-05-15'
protected

The API version to use.

$_ec2Endpoint = 'monitoring.amazonaws.com'
protected

The HTTP query server.

$_validDimensionsKeys
protected
Initial value:
= array('ImageId', 'AvailabilityZone', 'AutoScalingGroupName',
'InstanceId', 'InstanceType', 'LoadBalancerName')
$_validMetrics
protected
Initial value:
= array('CPUUtilization', 'NetworkIn', 'NetworkOut',
'DiskWriteOps', 'DiskReadBytes', 'DiskReadOps',
'DiskWriteBytes', 'Latency', 'RequestCount',
'HealthyHostCount', 'UnHealthyHostCount')
$_validStatistics = array('Average', 'Maximum', 'Minimum', 'Samples', 'Sum')
protected
$_xmlNamespace = 'http://monitoring.amazonaws.com/doc/2009-05-15/'
protected

XML Namespace for the CloudWatch Stuff.