Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to log dimension like AWS CloudWatch bundled metric

enter image description here

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"  
    ),  
));  
like image 468
Howard Avatar asked Jun 07 '13 10:06

Howard


People also ask

What is dimension in CloudWatch metrics?

A dimension is a name/value pair that is part of the identity of a metric. You can assign up to 30 dimensions to a metric. Every metric has specific characteristics that describe it, and you can think of dimensions as categories for those characteristics. Dimensions help you design a structure for your statistics plan.

What are the 3 states of the CloudWatch metric alarm?

A CloudWatch Alarm is always in one of three states: OK, ALARM, or INSUFFICIENT_DATA.

How do you make CloudWatch metrics from logs?

To create a metric filter using the CloudWatch consoleIn the navigation pane, choose Logs, and then choose Log groups. Choose the name of the log group. Choose Actions , and then choose Create metric filter. For Filter pattern, enter a filter pattern.

What is difference between CloudWatch and CloudWatch logs?

AWS CloudWatch works by collecting all the events data, metrics, and logs generated by the applications running inside the AWS ecosystem. The difference between CloudWatch metrics vs. CloudWatch logs is that metrics measure a certain point in time for the system. Whereas, logs are related to a specific event.


1 Answers

AvaliabiltyZone

You misspelled "AvailabilityZone"

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

like image 181
Honk der Hase Avatar answered Nov 15 '22 10:11

Honk der Hase