dozxos6346 2015-07-27 02:15
浏览 108
已采纳

aws php sdk返回内存数据,用于MemoryUtilization Metric,它从mon script perl放入cloudwatch

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')
);
  • 写回答

2条回答 默认 最新

  • drf97973 2015-08-11 02:37
    关注

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?