phpamazon-web-servicesbotoaws-sdkcloudwatch

aws php sdk return empty datapoint for MemoryUtilization Metric that put in cloudwatch from mon script perl


im using mon-script for retriving Memory From AWS Instances .in aws console every thing is ok but in api datapoint just return empty .it's really confusing because in boto(Python Version) every thing is ok and response correct but in php not

its my code

header("Content-type: text/html; charset=utf-8");
require_once '../sdk.class.php';
$cw = new AmazonCloudWatch(); 
$response = $cw->get_metric_statistics(
'System/Linux', 'MemoryUtilization',
date("c", strtotime('-5 minute')),
date("c", strtotime('now')),
300,
'Average', 
'Percent',
array('Name'=> 'InstanceId', 'Value'=>'i-8c15b124')
);

Solution

  • it solved by upgrade to version3 api .i think itwas a timestamp based problem related to microsecond in php