Turbonomic leverages MemoryUsed reported into CloudWatch. This document covers configuring the AWS CloudWatch agent to capture Windows EC2 MemoryUsed stats in Turbonomic by leveraging AWS Systems Manager.
The Linux Memory configuration can be found here: Setting up CloudWatch Memory Metrics on Linux Instances on AWS
How to Video:
- AWS SSM Agent Installed on EC2: Install SSM Agent
- IAM Role with the following permissions: AmazonSSMFullAccess
Note, the least privilege permissions needed for the IAM role are AmazonEC2RoleforSSM (custom policy to allow the action "ssm:GetParameter" to the resource "arn:aws:ssm:*:*:parameter/*", see JSON example)
Attach IAM Role
To configure each Windows EC2 instance through System Manager you need to attach an IAM role with the above permissions to each EC2 instance.
Select the EC2 instance and click on Actions>Instance Settings>Attach/Replace IAM role. Then select the IAM role with the required permissions and click Apply (see example below).
Now you should see the Role attached to the EC2 instance (see CloudWatch_Turbonomic in the example below).
Install the CloudWarch Agent:
Open the Systems Manager console at https://console.aws.amazon.com/systems-manager/.
In the navigation pane, choose Run Command.
Choose Run command.
In the Targets area, choose the instance to install the CloudWatch agent on. If you don't see a specific instance, it might not be configured for Run Command. For more information, see Systems Manager Prerequisites in the AWS Systems Manager User Guide.
In the Action list, choose Install
In the Name field, enter: AmazonCloudWatchAgent
Keep Version set to latest to install the latest version of the agent
Optional: to verify a successful in stall select the button next to an instance name in the Targets and Outputs area, and choose View output. Systems Manager should show that the CloudWatch agent was successfully installed.
Creating Parameter Store
Deploying The CloudWatch Configuration File
To confirm that the instance is sending the Memory Metrics, head to the CloudWatch page, click on Metrics and locate the Windows System namespace (only be created if the process worked successfully), click on Windows System > InstanceId > there should be 2 Metrics per Windows instance, click on 'MemeoryUsed' and confirm data is collected:
Please note it can take up to 30 minutes in some cases for Memory metric to show up in the Turbonomic user interface.
Note: This method refers to using the Run Command to enable CloudWatch metrics via the SSM agent as described herein the AWS documentation AWS Documentation
DISCLAIMER: The script is provided to our customers as a courtesy. However, the script is unsupported as details of the set up on AWS may change and the script is no longer being updated.