How to log dimension like AWS CloudWatch bundled metric

在这里输入图像描述

Can anyone explain how to use the AWS PHP SDK to log the metric in the style like the above screen.

I use the following PHP code but the select menu is showing " ELB: AvaliabiltyZone ", how to make it show " Aggregated by AvaliabiltyZone "? What is the logic used here?

$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

You misspelled "AvailabilityZone"

This maybe won't answer the question, but it might fix some things...


$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/14056.html

上一篇: Html.BeginForm的默认区域始终是ASP.NET MVC中的当前区域吗?

下一篇: 如何记录AWS CloudWatch捆绑的度量标准