Use case for Custom Metric Configuration to monitor Linux EC2 metrics
This section provides an overview of monitoring Linux EC2 memory metrics using Custom Metric Configuration.
- Enable additional memory metrics for Linux EC2 using AWS provided scripts.
Sample script:/home/ec2-user/scripts/aws-scripts-mon/mon-put-instance-data.pl--mem-used-incl-cache-buff --mem-util --mem-used --mem-avail --swap-util --swap-usedUpon executing the above script, the following parameters are created:- MemoryUtilization
- MemoryUsed
- MemoryAvailable
- SwapUtilization
- SwapUsed
Linux EC2 memory Metrics on AWS CloudWatch console:
- Create an Infrastructure policy by specifying AWS account configuration details (Label, access key, and secret key). Enable Custom Metrics check box under Custom Metrics Configuration section and click on the Add icon to configure the custom metrics.
- Specify AWSLinux as the Metric Configuration Label.
- Specify System/Linux as the AWS Namespace.
- Specify InstanceId or InstanceId,NodeName as the dimension name.
- Select the statistics type that you want to bring performance data of custom metrics. For example: Average
- Specify the period in minutes. A period is the length of time associated with a specific Amazon CloudWatch statistic. Each statistic represents an aggregation of the metrics data collected for a specified period. For example: 5 minutes
- (Optional) Specify the value of dimension if you want to exclude particular instance from monitoring. For example: win-server01
- (Optional) Specify the metric name that you want to exclude from monitoring. For example: Cpuutilization
The following figure shows the Custom Metric configuration for Linux System namespace to monitor Linux EC2 metrics.
The following figure shows the hierarchy of the Custom Metrics.
This screenshot shows the value of the attributes:
- MemoryUtilization
- MemoryUsed
- MemoryAvailable
- SwapUtilization
- SwapUsed
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*