英文:
In CloudWatch Metrics Insights, is it possible to graph metrics grouped by task instance or instance ID?
问题
我在Amazon ECS中运行一个名为my-api-service-TEST
的容器。该容器包含两个正在运行的my-api-service
任务实例。
目前,当绘制CPUUtilization Max
时,我会得到一个包含两个实例的图表聚合。
是否可能分别显示每个实例的CPU使用情况?这样我可以获得在该容器中运行的每个任务的图表?
英文:
I'm running a my-api-service-TEST
container in amazon ECS. The container contains two running task instances of my-api-service
.
Currently, when graphing CPUUtilization Max
I get an aggregation of both instances in the one graph.
Is it possible to display each instance's CPU usage separately? So I get a graph for each task running in that container?
答案1
得分: 1
可用的指标都是为ECS容器汇总的。要对指标数据进行更深入的分析,我们可以使用CloudWatch日志洞察查询。
例如:
stats avg(CpuUtilized) as CPU, avg(MemoryUtilized) as Mem by TaskId
| filter Type="Task"
| sort Mem, CPU desc
请参考这个AWS论坛帖子以获取更多详细信息。希望对您有所帮助。
英文:
The metrics available are all aggregated for ECS container. For deeper analysis on the metrics data, we can use CloudWatch Logs Insights queries.
For example:
stats avg(CpuUtilized) as CPU, avg(MemoryUtilized) as Mem by TaskId
| filter Type="Task"
| sort Mem, CPU desc
Please refer this AWS forum post for more details. Hope it helps.
答案2
得分: 1
你需要启用ECS CloudWatch容器洞察来获取每个任务和每个容器的度量数据。这将产生额外的费用。
英文:
You have to enable ECS CloudWatch Container Insights to get per-task and per-container metrics. This incurs an additional cost.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论