How to register size as AWS CloudWatch tag included

enter image description here

Can anyone explain how to use the AWS PHP SDK to register metrics in a style similar to the screen above.

I am using the following PHP code, but the select menu displays " ELB: AvaliabiltyZone ", how do I show it " Grouped by AvaliabiltyZone >"? What logic is 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" ), )); 
+7
source share
2 answers

Avaliabiltyzone

You mistakenly wrote "AvailabilityZone"

This may not answer the question, but it can fix some things ...

+3
source
 $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'))); 

Click here

0
source

All Articles