-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support kube_pod_ready_time metric #1465
Comments
Hey 👋 Can you explain where this API is at? If k8s API reports this, it sounds good to me. Note that |
Pardon my delay, I was off for some time.
Those come with two useful properties called:
This information should be enough to form a metric called |
I've patched v1.9.8 release with some additional code to report both ContainersReady and Ready timestamps and the transition between states can happen multiple times (e.g. pod stopped passing readiness probes). Quoting Pod Lifecycle docs:
I will change those metrics to report latest timestamp and match with your current convention: |
I'm pretty sure the kubelet exposes metrics about the readiness probes. I think it's the kubelet's responsibility to expose this. |
I am running 1.19+ and I am seeing |
I was looking for something just like this! Was there something blocking this from getting merged into kube state metrics 2? |
It looks like the PR has gone stale. Would you be interested in wrapping up the work? |
Would love to! I will update in the next couple of days. |
👍 This is useful for doing accurate total pod start time calculation, instead of trying to infer from ready count or something, in my particular case trying to benchmark the effect of some Istio sidecar settings on startup time. |
Looking forward to testing out this feature. @sgrzemski Are we stuck somewhere? My team has a similar use case where we're trying to figure out the time it takes a pod to be scheduled to a particular node. We can get hold of the time when the pod transitioned to |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
This would be really nice to have, @sgrzemski |
/remove-lifecycle rotten |
/remove-lifecycle stale |
Looking forward for this PR be merged, because I find that the "kube_pod_status_ready" has 2s delay to show ready status which compare with Ready timestamp from pod condition. I have reported a Issue, but no response yet. So, we can't rely on "kube_pod_status_ready". If we want to calculate POD startup time, that's an issue. |
This would be a really great metric to have. Helps us to understand the time taken for services to come up in cluster. |
The metric would be incredibly valuable! For example to know:
|
I'm still pretty new to Prometheus, but I'm using this query to collect an almost equivalent metric. Please let me know if you find this useful or foresee any issues with it: |
Could I know why the /4 is required? |
For sure, it looks to me like Not a great way to do it, but seems to be working for me, at least until this other PR gets merged. |
Hi @sgrzemski - can you share us the export of the dashboard that you've plotted based on these metrics? |
What would you like to be added:
Hello kube-state-metrics team!
I am a happy user of your metrics software. I would like the kube-state-metrics to report also the time, when pod became ready (passing readiness probe). According to docs, there are already a couple of gauges in seconds:
kube_pod_start_time
,kube_pod_container_state_started
, etc.Why is this needed:
I would like to be able to measure the time needed for the container to become fully operational and healthy. I already have the created and start timestamp, so a simple delta query in prometheus would do the trick if a metric reporting the ready time would be implemented.
Describe the solution you'd like
Query the Kubernetes API to get the ready timestamp.
Additional context
The text was updated successfully, but these errors were encountered: