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.

  1. Enable additional memory metrics for Linux EC2 using AWS provided scripts.
    Sample script:/home/ec2-user/scripts/aws-scripts-mon/ --mem-util --mem-used --mem-avail --swap-util --swap-used
    Upon executing the above script, the following parameters are created:
    1. MemoryUtilization
    2. MemoryUsed
    3. MemoryAvailable
    4. SwapUtilization
    5. SwapUsed

      Linux EC2 memory Metrics on AWS CloudWatch console:

  2. 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.

    1. Specify AWSLinux as the Metric Configuration Label.

    2. Specify System/Linux as the AWS Namespace.

    3. Specify InstanceId or InstanceId,NodeName as the dimension name.

    4. Select the statistics type that you want to bring performance data of custom metrics. For example: Average

    5. 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

    6. (Optional) Specify the value of dimension if you want to exclude particular instance from monitoring. For example: win-server01

    7. (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

Was this page helpful? Yes No Submitting... Thank you