CloudWatch Container Insights上的Prometheus监控可自动从容器中发现 Prometheus 指标。
CloudWatch 代理支持标准的 Prometheus 配置,如 Prometheus 文档中的 scrape_config 中所述。 我们在 enable-prometheus-metrics-in-cloudwatch 一节中设置了 CloudWatch 代理, 配置了抓取的作业,并将指标发送到 CloudWatch。
EKS集群的日志事件存储在 Amazon CloudWatch Logs 的 /aws/containerinsights/cluster_name/prometheus
LogGroup 中。
登录控制台,进入到 Cloudwatch -> LogGroups,您应该会看到 /aws/containerinsights/eksworkshop-eksctl/prometheus
LogGroup,选择此选项能够看到此处记录的所有容器的指标。
支持 Prometheus 的 CloudWatch 代理会自动从服务和工作负载收集指标。 从EKS集群收集的 Prometheus 指标位于 ContainerInsights/Prometheus
命名空间中。
登录控制台,进入到 Cloudwatch -> Metrics -> ContainerInsights/Prometheus -> “ClusterName, Namespace”,您应该会看到命名空间 prodcatalog-ns
。 选择任何指标(如下例中的“envoy_cluster_membership_healthy”)以添加到图表中。
在 CloudWatch 控制台中,Container Insights 为 EKS 中的 App Mesh 提供了预构建的报告。要查看有关 App Mesh Prometheus 指标的预构建报告,请登录控制台,切换至 Cloudwatch -> “Insights” -> “Container Insights”,在第一个下拉菜单中选择“Performance Monitoring”, 在下面的下拉菜单中选择"EKS Performance Appmesh":