Answers: <p>Memory consumption is a metric that has to be reported from inside the guest (EC2 instance).  You can <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html" rel="nofollow noreferrer">use a CloudWatch agent</a> to collect metrics from the guest directly. The agent also <a href="https://aws.amazon.com/about-aws/whats-new/2018/09/amazon-cloudwatch-agent-adds-custom-metrics-support/" rel="nofollow noreferrer">supports custom metrics</a> now.</p>
  
  <p>Alternatively, install a third party monitoring system. Which also means that you'll have to get an agent running on the EC2 instance. There are many of those, choose whatever fits your environment.</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-07-30T14:40:37.070Z
Answers: Thank you bgdnlp. Sorry, I should elaborated as what I have already attempted. I have created the necessary role and attached all the correct policies:
  
  Get_from_param_store
  ssm_put_parameter_only
  AmazonEC2RoleforSSM
  CloudWatchAgentAdminPolicy
  CloudWatchAgentServerPolicy
  AmazonSSMManagedInstanceCore
  
  I have also installed the cloudwatch agent and configured two config files:
  
  procstat config and statd config. Not sure why it is not sending the memory consumption for that process to CloudWatch.
Answers: Lamasu
Answers: CC BY-SA 4.0
Answers: 2019-07-24T05:51:41.000Z
Answers: 2019-07-24T05:51:41.000Z
Answers: bgdnlp
Body: <p>I have a process (exe) on a Windows ec2 that is using up lots of memory. I would like to create a custom metric that will collect data and send to CloudWatch. I would like to also create an alarm when a certain threshold has been reached or surpassed. </p>
  
Tags: <amazon-ec2><windows><amazon-cloudwatch>
Title: Custom metric for a Windows process on a Windows ec2 instance
UserDisplayName: Lamasu
ThreadText: # Custom metric for a Windows process on a Windows ec2 instance
  
  (Asked by: username_0 on 2019-07-23)
  
  I have a process (exe) on a Windows ec2 that is using up lots of memory. I would like to create a custom metric that will collect data and send to CloudWatch. I would like to also create an alarm when a certain threshold has been reached or surpassed.
  
  **Tags:** amazon-ec2, windows, amazon-cloudwatch
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-07-24. Score: 1
  
  Memory consumption is a metric that has to be reported from inside the guest (EC2 instance). You can [use a CloudWatch agent](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html) to collect metrics from the guest directly. The agent also [supports custom metrics](https://aws.amazon.com/about-aws/whats-new/2018/09/amazon-cloudwatch-agent-adds-custom-metrics-support/) now.
  
  Alternatively, install a third party monitoring system. Which also means that you'll have to get an agent running on the EC2 instance. There are many of those, choose whatever fits your environment.
  
  > **Comments:**
  > **username_0**: Thank you username_1. Sorry, I should elaborated as what I have already attempted. I have created the necessary role and attached all the correct policies:  Get_from_param_store ssm_put_parameter_only AmazonEC2RoleforSSM CloudWatchAgentAdminPolicy CloudWatchAgentServerPolicy AmazonSSMManagedInstanceCore  I have also installed the cloudwatch agent and configured two config files:  procstat config and statd config. Not sure why it is not sending the memory consumption for that process to CloudWatch.  
  
  ---
  
  