如何记录AWS CloudWatch捆绑的度量标准
任何人都可以解释如何使用AWS PHP SDK以上述屏幕样式记录度量标准。
我使用下面的PHP代码,但选择菜单显示“ ELB:AvaliabiltyZone ”,如何使它显示“ 由AvaliabiltyZone聚合 ”? 这里使用的逻辑是什么?
$response = $cw->put_metric_data("ELB", array(
array(
"MetricName" => "Latency",
"Dimensions" => array(
array("Name" => "AvaliabiltyZone" , "Value" => "us-east-1c")
),
"Timestamp" => "now",
"Value" => 1,
"Unit" => "None"
),
));
AvaliabiltyZone
拼写错误“AvailabilityZone”
这可能不会回答这个问题,但它可能会解决一些问题......
$cw = new AmazonCloudWatch();
$cw->set_region('monitoring.'.$region.'amazonaws.com');
$res1 = $CW->put_metric_data('Sys/RDS' ,
array(array('MetricName' => 'Uptime' ,
'Dimensions' => array(array('Name' => 'AvaliabiltyZone',
'Value' => 'us-east-1c')),
'Value' => $Uptime,
'Unit' => 'Seconds')));
点击这里
链接地址: http://www.djcxy.com/p/14055.html上一篇: How to log dimension like AWS CloudWatch bundled metric