[EKS] [request]: CloudWatch Metrics for pod_status
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
**Tell us about your request**
CloudWatch Container Insights should gather the `pod_status` metric i.e status of a pod as a metric. For example a pod goes to `CrashLoopBackoff` or `Pending` or `Running` state, the same should be available as a metric.
**Which service(s) is this request for?**
EKS
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
Currently, CloudWatch ContainerInsights shows the `pod_number_of_container_restarts` metrics per the [list of available Metrics for EKS in CloudWatch ContainerInsights](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-metrics-EKS.html). However, if we see the log group `/aws/containerinsights/Cluster_Name/performance`, the log events has `pod_status` for Type Pod per [Container-Insights-reference-performance-logs-EKS](https://github.com/awsdocs/amazon-cloudwatch-user-guide/blob/f4f7e0cc3ab5032fc13418b6e3a88b4a55bfa455/doc_source/Container-Insights-reference-performance-logs-EKS.md#container-insights-performance-log-events-for-amazon-eks-and-kubernetes), but this is for the the type `Deployment` or `Daemonset`. It would show as `Running` in the CloudWatch loggroup events, even when a particular pod is in `CrashLoopbackOff` state. It would be good, if logs are gathered at pod level & shows the pod_status as a metric.
Looking for a feature similar to [kube-state-metrics](https://github.com/kubernetes/kube-state-metrics/blob/master/docs/pod-metrics.md#pod-metrics) showing metrics like `kube_pod_status_phase`, `kube_pod_status_ready`, `kube_pod_status_scheduled` etc.
**Are you currently working around this issue?**
NA
**Additional context**
NA
**Attachments**
NA
Contributor guide
Research direction
Start with the linked CloudWatch EKS metrics and Container Insights performance-log documentation, then compare the requested pod metrics with the linked kube-state-metrics pod metrics. Done means agreeing on the supported pod-level status metrics and exposing them for EKS Container Insights, with corresponding validation documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, kubernetes
- Domain
- cloud, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100