Monitor memory usage for auto scaling group

本小妞迷上赌 提交于 2019-12-24 13:09:30

问题


I have an auto scaling group of instances in Amazon cloud and I want to monitor some metrics across all instances in auto-scaling group.

For example it would be nice to have a metric which reports the maximum memory usage across all instances that belong to the group. Thus I would have an opportunity to detect memleaks.

I know that I can monitor a group via load balancer's metrics, but I don't have one and don't want to.

Group metrics described on this page http://docs.aws.amazon.com/cli/latest/reference/autoscaling/enable-metrics-collection.html are also not suitable.


回答1:


Since you didn't specify which os you're using I'm going to give you my solution for linux. If you're using windows the same principles should apply.

What you want to do is create a script or use an existing script such as (AWS) mon-scripts-perl. Out of the box amazon does not monitor resources like disk space or memory this is due to the fact that they cannot monitor these resources without access to your OS. I use a home brewed python script because I also monitor other application metrics but these perl scripts should work for you. These scripts need to be run using crontab or task scheduler and can be set to run once a minute.



来源:https://stackoverflow.com/questions/20570750/monitor-memory-usage-for-auto-scaling-group

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!