

# Container Insights Prometheus 指标监控
<a name="ContainerInsights-Prometheus"></a>

适用于 Prometheus 的 CloudWatch Container Insights 监控可以自动发现来自容器化系统和工作负载的 Prometheus 指标。Prometheus 是一个开源系统监控和警报工具包。有关更多信息，请参阅 Prometheus 文档中的[什么是 Prometheus？](https://prometheus.io/docs/introduction/overview/)

[Amazon Elastic Container Service](https://aws.amazon.com/ecs/)、[Amazon Elastic Kubernetes Service](https://aws.amazon.com/eks/) 和在 Amazon EC2 实例上运行的 [Kubernetes](https://aws.amazon.com/kubernetes/) 集群支持发现 Prometheus 指标。收集了 Prometheus 计数器、计量表和汇总指标类型。

对于 Amazon ECS 和 Amazon EKS 集群，EC2 和 Fargate 启动类型均受支持。Container Insights 会自动从多个工作负载收集指标，您可以将其配置为从任何工作负载收集指标。

您可以采用 Prometheus 作为开源和开放标准方法，在 CloudWatch 中摄取自定义指标。具有 Prometheus 支持的 CloudWatch 代理可以发现并收集 Prometheus 指标，以便监控应用程序性能下降和故障，并更快地进行故障排除和发出告警。这也减少了改进可观测性所需的监控工具数量。

Container Insights Prometheus 支持涉及按用量付费的指标和日志，包括收集、存储和分析。有关更多信息，请参阅 [Amazon CloudWatch 定价](https://aws.amazon.com/cloudwatch/pricing/)。

**某些工作负载的预构建控制面板**

Container Insights Prometheus 解决方案包括针对本节中列出的常见工作负载的预构建控制面板。有关这些工作负载的示例配置，请参阅 [（可选）为 Prometheus 指标测试设置示例容器化 Amazon ECS 工作负载](ContainerInsights-Prometheus-Sample-Workloads-ECS.md) 和 [（可选）为 Prometheus 指标测试设置示例容器化 Amazon EKS 工作负载](ContainerInsights-Prometheus-Sample-Workloads.md)。

您还可以配置 Container Insights 以通过编辑代理配置文件从其他容器化服务和应用程序收集 Prometheus 指标。

带有适用于在 Amazon EC2 实例上运行的 Amazon EKS 集群和 Kubernetes 集群的预构建控制面板的工作负载：
+ AWS App Mesh
+ NGINX
+ Memcached
+ Java/JMX
+ HAProxy

带有适用于 Amazon ECS 集群的预构建控制面板的工作负载：
+ AWS App Mesh
+ Java/JMX
+ NGINX
+ NGINX Plus