How to monitor EC2 instances by memory?

前端 未结 2 1933
迷失自我
迷失自我 2021-02-19 02:50

Using Cloudwatch you can monitor your EC2 instances by several criteria, such as network usage, CPU usage, and so on…

Unfortunately, there is no metric for memory consum

相关标签:
2条回答
  • 2021-02-19 03:28

    Well, now the new CloudWatch agent can collect metrics like memory and disk usage, see the docs.

    With this you can monitor this kind of metrics, but you will need to install and configure the agent in the instances.

    0 讨论(0)
  • 2021-02-19 03:37

    Memory and Disk specific statistics require AWS to monitor at the OS level rather than the host level, so that is why they leave it out by default. It will probably be added at some point but since it has been on the wish list for about 7 years, we can assume it's a very low priority item.

    The recommended way to monitor memory usage is to create a custom Cloudwatch metric by using your own monitoring scripts on your instances. AWS have published documentation on how to achieve this on Linux instances with a set of (unsupported) scripts.

    Once your instances are publishing the custom metrics, you will be able to attach alarms to them in CloudWatch.

    0 讨论(0)
提交回复
热议问题