![]() If successful, you should expect to see output that looks like the below JSON.Run the get-metric-data command with the -start-time and -end-time flags set to a time period during which you expect metric data to have been reported.Īws cloudwatch get-metric-data -metric-data-queries file://./metric-data-queries.json -start-time -end-time. ![]() Next, choose AWS Servie and EC2 as the trusted entity for your IAM role and click Next. Select Roles from the sub navigation and click the Create Role button. To do so, open the AWS Management Console and go to the IAM service. Create a file name metric-data-queries.json and set its content to the following, replacing with your instance's ID. First, you need to grant the your EC2 access to the CloudWatch service.To do so, we will query the CloudWatch GetMetricData API using the AWS CLI. "Īfter you have installed and configured the CloudWatch agent, you should verify that the memory utilization metric is reporting data in the expected format. The below CloudWatch Agent configuration is the smallest configuration necessary to report Linux memory utilization to CloudWatch. ![]() The memory metric location is entirely customizable via Properties. The dimension combinations are important because CloudWatch treats each unique combination of dimensions as a separate metric, even if the metrics have the same metric name (see Dimension combinations). You can use the CloudWatch agent to collect both system metrics and log files from Amazon EC2 instances and on-premises servers. ![]() The metric reported must have exactly one dimension with the InstanceId dimension name. By default, AWS gives you visibility into metrics like CPU load logs, network latency, request volume, etc., but not EC2 memory usage. On Windows instances, Compute Software looks for the Memory % Committed Bytes In Use metric in the CWAgent namespace. The Amazon CloudWatch Agent enables you to collect memory utilization metrics from Amazon EC2 instances across operating systems.įollow the instructions to install the CloudWatch Agent.įor Linux instances, Compute Software looks for the mem_used_percent metric in the CWAgent namespace. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |