0

I am able to monitor a Windows instance's memory usage using custom metrics in CloudWatch.

I have followed the following blog to achieve that :

http://blog.krishnachaitanya.ch/2016/03/monitor-ec2-memory-usage-using-aws.html

Using that, I am able to monitor only one instance. I am now doing the process in every instance launched.

Can I do it at once for all instances instead of changing .json file and enabling cloud watch integration in every instance?

2
  • Windows or Linux? Commented Jan 6, 2017 at 15:22
  • I am working on Windows instances Mark Commented Jan 6, 2017 at 15:45

2 Answers 2

3

If the instances are already launched, you have to do it for each instance. Else you can take an AMI of the first instance, then launch other instances from that AMI and you do not have to do it for each instance.

If you have to do it manually, consider something like Ansible to do it for you. There is a bit of learning but not difficult.

BTW, adding custom metrics is straightforward for Linux instances. Monitoring Memory and Disk Metrics for Amazon EC2 Linux Instances

For Windows instance: Sending Performance Counters to CloudWatch and Logs to CloudWatch Logs Using Amazon EC2 Simple Systems Manager

Sign up to request clarification or add additional context in comments.

2 Comments

I am working on Windows instances. How can I enable Cloud Watch Integration checkbox using Ansible?
@prudhvi there is Ansible module for windows cloudwatch integration. You can try following this tutorial, and use Ansible equivalent. docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/…
0

If your instances have the appropriate instance profile and are running the SSM agent (which they probably are if you launched from an Amazon provided AMI), you can use SSM run command to run arbitrary powershell against an instance or a set of instances (using tags). There is even a Amazon managed SSM document called AWS-ConfigureCloudWatch that is built specifically for this use case.

See http://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.