简体   繁体   English

使用 AWS Container Insights 监控 Kubernetes CronJob 完成情况

[英]Monitoring Kubernetes CronJob completion using AWS Container Insights

Currently, I am not able to monitor any parameter on CronJobs (in Kubernetes) other than memory usage.目前,除了 memory 的使用情况外,我无法监控 CronJobs(在 Kubernetes 中)的任何参数。 Is there a way to monitor CronJob completion/failure in AWS CloudWatch?有没有办法在 AWS CloudWatch 中监控 CronJob 的完成/失败? Thanks.谢谢。

You can check Cronjob completion/failure by pods status only.您只能通过 pod 状态检查 Cronjob 完成/失败。 However if you want to verify you can check by logs also if you have enable logs from EKS dashboard which will push logs to cloud watch and check the logs of cronjobs.但是,如果您想验证,您也可以通过日志检查是否从 EKS 仪表板启用日志,这会将日志推送到云手表并检查 cronjobs 的日志。

Also you can do something like:您也可以执行以下操作:

kubectl get jobs <job-name> -o json | jq '.status.conditions'

but please just keep in mind Jobs never Failed (its Pods terminated with error doesn't mean the Jobs has Failed但请记住, Jobs never Failed (its Pods terminated with error doesn't mean the Jobs has Failed

How to get notification on job failing:如何获得作业失败的通知:

https://medium.com/faun/how-to-get-notifications-when-kubernetes-cronjobs-fail-ed4ca4313e81 https://medium.com/faun/how-to-get-notifications-when-kubernetes-cronjobs-fail-ed4ca4313e81

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM