In CloudWatch Metrics Insights, is it possible to graph metrics grouped by task instance or instance ID?

huangapple go评论62阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年7月24日 16:46:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76752782.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定